I have a command button that is supposed to automatically upload all the excel files to a table in Access 2007. but i get this error " could not find the Object 'c:\todays\*.xl s'". the directory is correct so i don't know what hte problem is. here is my code
Code:
Private Sub Upload_Click() On Error GoTo Err_Upload_Click DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Usage", "C:\Todays\*.xls" Screen.PreviousControl.SetFocus DoCmd.FindNext Exit_Command0_Click: Exit Sub Err_Upload_Click: MsgBox Err.Description End Sub
Comment