Exporting to excel file cannot update database or object is read-o

R

Roger

I created a Macro to TransferSpreadSHeet from a Query that I cready to make a
graph. I had it working fin but then I tried it on a second computer on my
network and since then I have not been able to get it to work. I get the
Cannot update. Database or object is read-only.

I have checked the file and it is not protected, I have moved it to the
local drive and I still get the error.

Can someone tell me the steps to create a macro to export my file to a excel
file and upadate the data in the file?
 
K

Ken Snell [MVP]

How long is the path and file name string for the file, The limit is 64
characters.

Otherwise, tell us the values of the arguments for your TransferSpreadsheet
macro..
 
R

Roger

I don't think I am exceeding the limit.
Transfer Type - Export
Spreadsheet Type - Microsoft Excel 8-10
Table Name - "Effeciency Data Query for exporting"
File Name - "C:\Documents and Settings\vn028328\Desktop\Monthly.xls"
Has Field Name - Yes
Range -

I've tried to change the file name several times but it does not matter I
still get the same issue.

Thanks for your help!!
 
K

Ken Snell [MVP]

Let's try an experiment. Use File | Export menu and do a manual export of
the table to the desired EXCEL filename/path. Does that export work without
an error?

Does "vn028328" folder exist under "Documents and Settings" on the PC that
is giving the error?

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/
 
R

Roger

Ken,

I can manually export them to any file and location, I only get this issue
when I tyr to transferspreadsheet using the macro.

Yes vn028328 location is on my computer as well.

Maybe I should use code instead only I am new to access and not sure how to
write the code.
 
R

Roger

Action TransferSpreadsheet

Transfer Type Export
Spreadsheet Type Microsoft 8-10
Table Name Effeciency exporting
File Name "D:\VN02832\Monthly"
Has Field Names No
Range


That is what I have in the macro
 
K

Ken Snell [MVP]

Remove the " characters from the File Name argument.
D:\VN02832\Monthly

If that doesn't work, insert an = character at the front of the File Name
string:
="D:\VN02832\Monthly"

I assume that the D drive is mapped the same way on both PCs?
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top