بفرما اینها را یک نگاه بنداز شاید کارت راه بی افته
https://www.techwalla.com/articles/h...ert-xls-to-mdb
Dim strFileName As String ' filename we are importing from
'get filename from user to import
If strFileName = "" Then
With ComDlg
.CancelError = True
.Filter = "XLS Files (*.xls)|*.xls" _
& "|All Files (*.*)|*.*"
.DefaultExt = ".ext"
.DialogTitle = "Select File"
.FilterIndex = 1
'.InitDir = "default directory goes here"
.Flags = cdlOFNHideReadOnly
.ShowOpen
If .FileName <> "" Then strFileName = .FileName
End With
End If
'do import of file
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, "ImportTable", strFileName, True, "ImportArea"
Exit_cmdImport_Click:
Exit Sub