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_import.
Expand|Select|Wrap|Line Numbers
- 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?