View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Protect Worksheet

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