Importing Excel using DoCmd.TransferSpreadsheet

CravenStu

New member
Local time
Today, 23:06
Joined
Jun 12, 2003
Messages
6
This is driving me mad, please help.

I have written the follow code;

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel97, strImportTable, strImportFilePath, True, "200508!A:F"

200508 is the sheet name.

When I run the code I geta message saying 'can't find object '200508$A:F'.

Why would the '!' be replaced with '$' when the code is run.

I am using Access 97

Thanks

Stu
 
Try giving the range in your spreadsheet a name, then use that in your TransferSpreadsheet method.
 

Users who are viewing this thread

Back
Top Bottom