#2
zyxyklh2023-05-13 23:45
|
Dim fDialog As Office.FileDialog '从这里就报错
Set fDialog = Application.FileDialog(msoFileDialogFilePicker)
With fDialog
.AllowMultiSelect = False
.Filters.Clear
.Filters.Add "Access files", "*.mdb"
.Filters.Add "All files", "*.*"
If .Show Then
DoCmd.TransferDatabase acImport, "microsoft Access", .SelectedItems(1), acTable, "NotTch", "EXPORT", 0, 0
Else
Exit Sub
End If
End With
MsgBox "导入成功!"