hi guys,
i had made a simple import menu for xlsx, xls and accdb files from the current project folder with fixed name. see below the xlsx_data_impor t.
now i would like to add a file dialog, so i can choose which file i actually wanna import. i was searching in internet but there attempts were so complicated and nothing worked for me.
can somebody help with a simple file dialog to import 1 file only?
i had made a simple import menu for xlsx, xls and accdb files from the current project folder with fixed name. see below the xlsx_data_impor t.
Code:
Private Sub xlsx_Data_Import_Click()
On Error Goto ErrorHandler
DoCmd.TransferSpreadsheet acImport, , "Data", Application.CurrentProject.Path & "\Data_Backup.xlsx", True, "Data!"
Exit Sub
ErrorHandler:
MsgBox "No such file exists in this directory!"
End Sub
can somebody help with a simple file dialog to import 1 file only?
Comment