Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Determine if a sheet is protected?

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

thank u


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default Determine if a sheet is protected?

Try

activesheet.protectcontents

HTH

Bob

"Robert Crandal" wrote in message
...
How can I determine if a sheet is protected or not?

thank u




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Determine if a sheet is protected?

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"
wrote:

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

thank u


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default Determine if a sheet is protected?

Hi Robert,

Sheet1.ProtectContents

True = protected, False = unprotected.


"Robert Crandal" wrote:

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

thank u


.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Determine if a sheet is protected?

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
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
How do you Determine if a Worksheet is protected? nesmith6866 Excel Programming 2 December 1st 09 09:01 PM
How to determine if the workbook is protected? filo666 Excel Programming 0 February 4th 09 07:45 AM
Line count in 1 sheet to determine paste range in 2nd sheet. [email protected] Excel Programming 0 September 26th 08 07:43 PM
Protected cells in Protected sheet Nenad_S[_2_] Excel Programming 0 February 5th 08 02:40 PM
How to determine whether a protected sheet has a password? Jerry W. Lewis Excel Programming 1 July 28th 07 10:39 PM


All times are GMT +1. The time now is 08:19 PM.

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

About Us

"It's about Microsoft Excel"