Hi,
I am trying to tranfer a excel spreadsheet to my access application the process work fine if I choose the excel file I wish to transfer and press "OK". The problem is that if I wish to exit by pressing the "Cancel" button I get an error message:
"Run-Time Error '2522':
The action or method requires a File Name argument."
I think that the error comes from the dialog box itself but how do I fix it? Here is the code I have that transfers the Excel spreadsheet. Could there be something wrong with it??
DoCmd.TransferSpreadsheet acImport,acSpreadsheetTypeExcel3,
"TempJovacoExtract", strFichier, True
I am trying to tranfer a excel spreadsheet to my access application the process work fine if I choose the excel file I wish to transfer and press "OK". The problem is that if I wish to exit by pressing the "Cancel" button I get an error message:
"Run-Time Error '2522':
The action or method requires a File Name argument."
I think that the error comes from the dialog box itself but how do I fix it? Here is the code I have that transfers the Excel spreadsheet. Could there be something wrong with it??
DoCmd.TransferSpreadsheet acImport,acSpreadsheetTypeExcel3,
"TempJovacoExtract", strFichier, True