What code do I need in a macro to determine whether a sheet is protected or
not?
John, here is one way,
Sub Check__Sheet_Protection()
Dim wks As Worksheet
Set wks = ActiveSheet
With wks
If .ProtectContents _
Or .ProtectDrawingObjects _
Or .ProtectScenarios Then
MsgBox quot;Protected sheetquot;
Exit Sub
Else
MsgBox quot;Unprotected Sheetquot;
End If
End With
End Sub--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 amp; 2003
quot;Johnquot; gt; wrote in message
...
gt; What code do I need in a macro to determine whether a sheet is protected
gt; or
gt; not?
- Oct 05 Fri 2007 20:40
How recognize sheet protected?
close
全站熱搜
留言列表
發表留言