Private Sub Command1_Click()
Dim dbs As Database
Set dbs = OpenDatabase(App.Path & "\db1.mdb")
If Dir(App.Path & "\MyExcel.xls") <> "" Then Kill App.Path & "\MyExcel.xls"
dbs.Execute "SELECT * INTO [Excel 8.0;DATABASE=" & App.Path & "\MyExcel.xls].[WorkSheet1] FROM 表名"
dbs.Close
Set dbs = Nothing
End Sub
追问运行不了,能不能写全一点,能够运行的
追答我这里运行没问题