View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Paul B[_8_] Paul B[_8_] is offline
external usenet poster
 
Posts: 20
Default check protection

masterphilch. here is one way

Sub testme()
With ActiveSheet
If .ProtectContents Then
MsgBox "Sheet is protected"
Else
MsgBox "Sheet is not protected"
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 2000 & 2003
** remove news from my email address to reply by email **

"masterphilch" wrote in message
...
How can I check through VBA if a worksheet is protectet or not?

thx