Test if protected
Just run
ActiveWorkbook.Protect Contents:= true
or
ActiveWorkbook.Protect Contents:= true password:= "passkey"
then you know it is.
and
ActiveWorkbook.Unprotect
or
ActiveWorkbook.Unprotect Password:= "passkey"
when you need to unprotect it.
Do you really need to query the status?
You could try to change the value of a cell you know should be locked
and intercept the error if Protection is enabled.
|