Macro to protect and unprotect
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
|