Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sheet Protection Status (2003)

    Is there a formula which displays the status of Tools | Protection | [Un]Protect Sheet ?
    I'd like to put an annunciator at the top of a sheet to remind me if it is locked or not.
    The =cell(... formula only shows the status of the cell, not of the sheet status.
    TIA
    Donald

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Sheet Protection Status (2003)

    You could add this function to a module:
    <pre>Option Explicit
    Function SheetProtected(rng As Range)
    If rng.Parent.ProtectContents Then
    SheetProtected = "Sheet is Protected"
    Else
    SheetProtected = "Sheet is UnProtected"
    End If
    End Function</pre>


    And then use:
    <pre>=SheetProtected(a1)</pre>


    to get the value. [Note if you change the protection, you will have to recalc <F9> to show the updated status.]

    Steve

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Sheet Protection Status (2003)

    You could add

    Application.Volatile

    at the beginning of Steve's function, so that it is recalculated whenever the worksheet is recalculated.

  4. #4
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sheet Protection Status (2003)

    Bingo!
    Thanks guys,
    Donald

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •