access数据库中所有的表名都存带汪在一蠢羡仔个叫做派梁MSysObjects的表中了,所以在这个表中查询就可以了。以下是代码:
Dim L_dadap As New OleDb.OleDbDataAdapter("select * from MSysObjects ", L_conn)
Dim L_dtable As New DataTable
L_dadap.Fill(L_dtable)
Dim TabName(L_dtable.Rows.Count - 1)
For i = 0 To L_dtable.Rows.Count - 1
TabName(i) = L_dtable.Rows(i).Item("name")
Next
连接数据库,然后导出