HELP! -Runtime error issue -Trying to automate Excel import to Access

BrownRecluse

New member
Local time
Today, 07:21
Joined
Sep 13, 2007
Messages
2
Nevermind, I'm trying a new approach...
 
Last edited:
Your syntax is all wrong -

DoCmd.TransferSpreadsheet , , "tempTable" & sheetName, fname, True, sheetName
You aren't putting the inputs in the right spot. You aren't telling it whether it is an import or export, what Excel version, nowhere do you have assigned the value for sheetName, you don't need the range for the full sheet. The correct syntax is:
Code:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "TableName", "FileName", True
 
Is there any way besides using TransferSpreadsheet to do automatic imports?

Thanks again for you help,

-Susan
 
Last edited:

Users who are viewing this thread

Back
Top Bottom