Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    formula to show whether sheet is protected or not (xp)

    HI

    I know you can use the =INFO(xxx) for various info to be displayed in a cell, such as the path of the location of the workbook, its size etc...

    Is there any formula to show whethe a sheet is protected or not?
    Thanks,

    pmatz

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

    Re: formula to show whether sheet is protected or not (xp)

    I don't think there is a built-in function for this. You could create a custom function:

    Function SheetProtected(oCell As Range) As Boolean
    Application.Volatile
    SheetProtected = oCell.Parent.ProtectContents
    End Function

    Use like this:

    =SheetProtected(A1)

    if you want to know if the active sheet is protected, or

    =SheetProtected(OtherSheet!A1)

    if you want to know if OtherSheet is protected.

  3. #3
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: formula to show whether sheet is protected or not (xp)

    Thought not either - thanks for the idea of making a custom function thats better than the vba sub i did
    Thanks,

    pmatz

Posting Permissions

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