Protect Worksheet
Hi Gord,
I tried the code which you suggested and it works. Thanks very much.
Lennox.
"Gord Dibben" wrote:
Lennox
If using Excel 2002 or 2003 you have the option when protecting the sheet of
allowing users to do certain operations on the sheet.
Earlier versions would require a macro to unprotect then re-protect the sheet.
ActiveSheet.Unprotect Password:="justme"
'do your stuff
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
Gord Dibben Excel MVP
On Mon, 29 Nov 2004 17:47:05 -0800, LennyG
wrote:
I wrote a macro to select certain options when reports on my worksheets are
being
printed. The sheets are then protected and when the macro is run, a message
appears stating that the commands could be accessed if the password is
entered (to remove the protection). How could I get the protection to
remain and get the macro to work.
Thanks
Lennox
|