transferspreadsheet

pb21

Registered User.
Local time
Today, 06:28
Joined
Nov 2, 2004
Messages
122
Hi I have some code that opens a spreadsheet with the view of doing the following:
DoCmd.TransferSpreadsheet acImport, , "TblTransferSpreadsheet", "D:\" & filename, True, "A1:J" & lngRows

It reports back error 3251 operation not supported by this type of object.

any ideas?

if i copy the spreadsheet and create a new workbook with a different name it works.

regards
Peter
 
does the filename contain apostrophes, commas, spaces, etc?
 
ah here is the code:
filename = "XX MASTER SPREADSHEET" & ".XLS"

spaces are here.

how should i change this?

Interestingly I changed the name to xxxx with no spaces and it still failed with the same message.



regards
 
Last edited:
its probably the last bit thats causing the problem,

"A1:J" & lngRows

what does lngrows do?

try leaving this blank, or just use "A:J" and see what happens.
 

Users who are viewing this thread

Back
Top Bottom