Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransferSpreadsheet error - "object is read only"

Status
Not open for further replies.

Jacqui3

MIS
May 8, 2002
13
0
0
ZA
Hi,

When I attempt to use the Transferspreadsheet command I get the error message "object is read only".

The background is I had to have the database written to a CD to move it to a client site. When I copied the database off the CD I changed the file property to remove the read only indicator.

Everything else works fine except the Transferspreadsheet command.

 
Is the spreadsheet read only?
Not sure what else it could be if it's not.

B ----------------------------------
Ben O'Hara
bo104@westyorkshire.police.uk
----------------------------------
 
i had a similar problem with a text log file. The extension was strange, and I was unable to import it into Acc 2k until I changed the file extension. Does your spreadsheet have a funny extension?
 
I am using the Transferspreadsheet command to create a spreadsheet.

I managed to sort of resolve the problem. I moved the database to a new directory. Everything seems to be working for the moment.

 
I also had the problem (on export) with strange file extensions. I include the code to create as .xls then rename to .cap (the strange one) - I'm sure you can adapt it for Import. Mine worked on some machines but not others (and so I assume there's some strange switch in either Access or Windows that I'm not aware of - does anyone know what?)

tempFile = "temp.xls"
WantedFile = "output.cap"
DoCmd.TransferSpreadsheet acExport, 8, "tableIn", tempFile, True, ""
Set fs = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
' in case not there
fs.DeleteFile WantedFile, -1
' so can re-create
On Error GoTo 0
Name tempFile As WantedFile
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top