Hi,
I am using Excel 2007. When I protect a multi-sheet workbook with a password, the Macros within the workbook cease to function. They will only function when the workbook is either unprotected or protected without using a password.
Would appreciate help.
Thanks.
1) Read up on employing the UserInterfaceOnly:=True parameter in a VBA-based "protect" command. This will allow all other VBA to continue to function if this parameter is set when the sheet(s) are protected.
This flag will have to be reset each time the workbook is opened, too, as it does not persist when the workbook is closed.
2) Teach your macros the password and let them unprotect the sheet, run their code, protect again when finished.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Thanks Jerry; I will give it a shot and let you know how it goes.
Regards,
Peter
For what it is worth, I would recommend option 2 over option 1, which is not 100% reliable in my experience.
Good luck.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks