Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default check protection

How can I check through VBA if a worksheet is protectet or not?

thx
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default check protection

that was fast!!
thanks a lot

Paul B wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protection and Spell check ochoaex Excel Worksheet Functions 0 February 3rd 06 03:45 PM
Spell check and protection Mici Excel Discussion (Misc queries) 1 January 14th 06 04:07 AM
Protection of check boxes in excel 2002 Newbeetle Excel Discussion (Misc queries) 2 March 14th 05 12:59 PM
Spell Check w/ Protection Peter Excel Discussion (Misc queries) 3 December 29th 04 09:28 PM
Visually check Protection code Stuart[_5_] Excel Programming 3 May 31st 04 07:39 PM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"