I am using some VBA code to import a spreadsheet into a database, which is:
If the spreadsheet in question is open then it works fine. However if it is not open then I get the error:
Run-time error 3274 - external table is not in the expected format
I have tried changing Excel3 to Excel9 which is the version I use, but still to no avail.
I'd really appreciate it if someone could help me solve this one!
Thanks
Stuart
Code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel3, "DebtCollectionS", "c:\access\DebtCollectionS.xls", True
If the spreadsheet in question is open then it works fine. However if it is not open then I get the error:
Run-time error 3274 - external table is not in the expected format
I have tried changing Excel3 to Excel9 which is the version I use, but still to no avail.
I'd really appreciate it if someone could help me solve this one!
Thanks
Stuart