Question Locked

Export Access 2003 to specific excel worksheet

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello. I am trying to export several Access 2003 select queries to Excel 2003 using an Access macro. However, I have tried using the macro command "TransferSpreadsheet" and am receiving the error "Cannot update. Database or object is read-only". Per the user/group settings any user has read/write access in the database. I also tried the macro command "OutputTo", however I can determine who to output to a specific worksheet in the workbook.

Any help would be GREATLY appreciated. Thanks in advance.

2 replies

by nomodrama

First open Excel and save a file under the name you will use as the file you are exporting. (I am exporting a table and not a query. You may have to use the make table query first and then export the table - I haven't tried to export a query).
Macro:
Action: OutputTo (Comment: outputs Access Table to MS Excel)
Object Type: Table (you can select Query here if you want to give it a try)
Object Name: Retrolog - this is the name of the table or query you are exporting (this is what mine is called, use your name)
Output Format: MicrosoftExcel(*.xls)
Output File: LEAVE IT BLANK
Auto Start: No
Template File: LEAVE IT BLANK
Encoding: LEAVE IT BLANK

I have been using the macro once a week for the last 3 years. It's simple and I'm quite certain there are many other ways but, I know this one has worked for me the last 460+ times I have used it. Good Luck.

This discussion is closed to new replies.