Importing Spreadsheet

KevW

Registered User.
Local time
Today, 10:59
Joined
Nov 11, 2005
Messages
41
I am trying to import and Excel 2000 workbook into an Access database using the following code:

Private Sub Import_EDS_testchecks ()

DoCmd.TransferSpreadsheet acImport,9,"EDS_testchecks","C:\Documents and Settings\Kevin\My Documents\testchecks_030406.xls",True,

End Sub

When I try to run the code I get a Complie Error which states that there is a syntax error, I have spent over two hours trying to correct this error but with know look.

I think that it is going to be something really obvious so has anybody got any ideas as to where I am going wrong.

Thanks
 
Last edited:
I don't think 9 is a valid spreadsheet type. Also I would remove the loast , or put the parameters in qutations.
 
Was the type of spreadsheet, should have been Excel 2000. Also had an extra comma at the end of the statement.

Thanks for your help now works as it should do.
 

Users who are viewing this thread

Back
Top Bottom