F
freseh
Hello Everyone!
I have a small problem that needs a simple solution.
How do I check with VBA if my activesheet is password protected?
What I want to have is a macro that protect if it's unprotected and
vice verse.
And this doesn't work, the red text must be something else :
If ActiveSheet.Protect.Enabled = False Then
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, Password:="bossboss"
Else
ActiveSheet.Unprotect Password:="bossboss"
End If
Thanks in advance for your help!
I have a small problem that needs a simple solution.
How do I check with VBA if my activesheet is password protected?
What I want to have is a macro that protect if it's unprotected and
vice verse.
And this doesn't work, the red text must be something else :
If ActiveSheet.Protect.Enabled = False Then
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, Password:="bossboss"
Else
ActiveSheet.Unprotect Password:="bossboss"
End If
Thanks in advance for your help!