check if protected
If Worksheets("myWorksheet").ProtectScenarios or _
Worksheets("myWorksheet").ProtectDrawingObjects or _
Worksheets("myWorksheet").ProtectContents Then
MsgBox "This workship is protected."
Else
MsgBox "Sheet is not protected"
End If
--
Regards,
Tom Ogilvy
"Lloyd" wrote in message
...
Does anyone know a code snippet that will suffice to
check whether or not a worksheet is protected?
I've begun using the following code which checks the
ProtectScenarios property, however, am not sure if this
really is appropriate, since I've not set up any
scenarios in the workbook, and am concerned about the
possibility of unpredictable behavior.
If Worksheets("myWorksheet").ProtectScenarios Then
MsgBox "This workship is protected."
Else
MsgBox "Sheet is not protected"
End If
Thanks for any suggestions.
Lloyd
|