View Full Version : Macro to Export to Excel


mosh
07-07-2008, 02:35 AM
Hi All,

I have a macro that exports (transfer spreadsheet) queries into excel. But since I have put a password to modify the data in excel, the macro can't export the data into excel.

Is there a way around this? The error message I get when trying to run the macro is "Cannot Update, Datebase or object is read only".

Thanks for your help.
________
Avandia law (http://classactionsettlements.org/)

spoole
07-07-2008, 06:41 AM
doubt you will be able to do it in macros but you can in VB if you write code to open Excel, open the workbook, remove the password protection then run your query then use VB to set the password protection on again in excel before you save the file. This may point you in the right location

http://www.eggheadcafe.com/forumarchives/Accessexternaldata/Sep2005/post23514060.asp