Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to protect and unprotect a excel sheet with a macro, how do I pass
the password to the command? Sub Macro12() ' ' Macro12 Macro ' Macro enregistrée l ' ' ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
try something like: Sub Macro12() ' ' Macro12 Macro ' Macro enregistrée l Activesheet.unprotect password:="your_password" ' some code ActiveSheet.Protect password:="your_password", DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub -- Regards Frank Kabel Frankfurt, Germany tetreaultl wrote: I want to protect and unprotect a excel sheet with a macro, how do I pass the password to the command? Sub Macro12() ' ' Macro12 Macro ' Macro enregistrée l ' ' ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Modifying a protect unprotect macro | Excel Discussion (Misc queries) | |||
Protect and Unprotect all worksheets with macro | Excel Discussion (Misc queries) | |||
Macro to Protect OK, Unprotect now messed up! | Excel Worksheet Functions | |||
protect / unprotect VBA project by macro | Excel Discussion (Misc queries) | |||
Macro to protect/unprotect worksheets | Excel Programming |