PC Review


Reply
Thread Tools Rate Thread

Determine if a sheet is protected?

 
 
Robert Crandal
Guest
Posts: n/a
 
      18th Jan 2010
How can I determine if a sheet is protected or not?

thank u


 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      18th Jan 2010
Try

activesheet.protectcontents

HTH

Bob

"Robert Crandal" <(E-Mail Removed)> wrote in message
news:h865n.9557$(E-Mail Removed)...
> How can I determine if a sheet is protected or not?
>
> thank u
>
>



 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      19th Jan 2010
Sub test()

MsgBox ActiveSheet.ProtectionMode 'returns true or false

End Sub


Gord Dibben MS Excel MVP

On Mon, 18 Jan 2010 16:28:18 -0700, "Robert Crandal" <(E-Mail Removed)>
wrote:

>How can I determine if a sheet is protected or not?
>
>thank u
>


 
Reply With Quote
 
Libby
Guest
Posts: n/a
 
      19th Jan 2010
Hi Robert,

Sheet1.ProtectContents

True = protected, False = unprotected.


"Robert Crandal" wrote:

> How can I determine if a sheet is protected or not?
>
> thank u
>
>
> .
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      19th Jan 2010
With worksheets("SomeSheetNameHere")
If .ProtectContents = True _
Or .ProtectDrawingObjects = True _
Or .ProtectScenarios = True Then
'it's protected
else
'it's not protected
End with



Robert Crandal wrote:
>
> How can I determine if a sheet is protected or not?
>
> thank u


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you Determine if a Worksheet is protected? nesmith6866 Microsoft Excel Programming 2 1st Dec 2009 09:01 PM
Line count in 1 sheet to determine paste range in 2nd sheet. wpreqq99@yahoo.com Microsoft Excel Programming 0 26th Sep 2008 07:43 PM
Copying a protected sheet to another sheet or workbook loses prote Rudy Microsoft Excel Crashes 0 30th Nov 2007 10:17 PM
How to determine whether a protected sheet has a password? =?Utf-8?B?SmVycnkgVy4gTGV3aXM=?= Microsoft Excel Programming 1 28th Jul 2007 10:39 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi Microsoft Excel Programming 1 2nd May 2004 03:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:52 PM.