PDA

View Full Version : Solved: Access transferspreadsheet error



calenger
01-19-2006, 02:20 PM
Hi All

Was wondering if anyone had run in to this before.

I am importing a excel 2000 spreadsheet into access 2000 using the transferspreadsheet method in vba code. Works great for most sheets but 1. The one sheet in question has a space in the name. (procedure codes). I think this is the problem. Works fine without the space. I have tried using Range:="Procedure Codes!A2:B1500" and "'Procedure Codes'!" & "A2:B1500" and "'Procedure Codes!'" & "A2:B1500" with no joy. All I have found by searching the internet.

Also I have tried sheet3 and worksheet.

The error is run-time error '3139':

Syntax error in PARAMETER clause.

Any help appreciated greatly.
Thanks

alimcpill
01-20-2006, 01:53 AM
This error is happening because 'procedure' is a Jet reserved word. Normally the first syntax you suggested is fine for sheets with a space in the name.
I'm afraid I don't know any way around this, but at least you know the cause of the problem...

calenger
01-20-2006, 06:33 AM
Ahh

Thanks. Would not have figured that out.