Option Explicit
Sub testProtect()
Dim Password As String
ActiveSheet.Protect Password = "stu"
End Sub
Sub testProtect()
ActiveSheet.Protect Password = "stu"
End Sub
joe have you tested what im saying????
cause as a quote from you
ActiveSheet.Protect password = "stu"
is the same as:
ActiveSheet.Protect
it isnt the same at all
cause
ActiveSheet.Protect
wouldnt want a password to unprotect
but
ActiveSheet.Protect password = "stu"
does expect a password to unprotect
ande the password isnt "stu"
hey hey
Stu
ActiveSheet.Protect False
ActiveSheet.Protect -1
Tushar,
This is new to me!
I tested it and this wrong syntax, does work with a passwoed of:
FALSE
and it will not take any other format of this, like:
False, false, -1, 0, 1
This is a good thing to know!
It never occured to me to try a Boolean. I like it, when I learn something new, thanks.