+ Reply to Thread
Results 1 to 3 of 3

Need Icon Indicator for Sheet Protection

  1. #1
    Registered User
    Join Date
    02-20-2007
    Location
    Smithtown, NY
    Posts
    3

    Cool Need Icon Indicator for Sheet Protection

    I am working on a worksheet in which I Unprotect and protect using (ActiveSheet.Unprotect) and (ActiveSheet.Protect).

    My question is - Can I indicate using a colored light if a worksheet is protected (Green for Unprotect and Red for Protect) by means of an icon placed on the bar next to the file, edit,... bar ?

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    I'm not sure about an icon, but you can set the Excel application title and/or status bar text based on a sheet's protection (or on a workbook's protection).

    For example:

    Please Login or Register  to view this content.
    When your selection changes, the Application window title (caption) will change to either "Protected - Book 1" or "Unprotected - Book 1" (Book 1 being the name of your file.) The StatusBar statement will also set that to the same value (you can remove if you'd like).

    I also put this into the Worksheet_SelectionChange event. You may also want it in the Worksheet_Activate event or the Workbook_Open event to check at those times.

    Perhaps someone else knows how to manipulate the toolbars and icons through vba..

  3. #3
    Registered User
    Join Date
    02-20-2007
    Location
    Smithtown, NY
    Posts
    3

    Smile Yes - Thank you for this Help

    Thank you for your input.

    This solved my problem of showing the sheet protection on each of my sheets.

    I used to use 2 userforms (very small ones) that indicated a protected sheet but it was getting in the way of my data and I had to close them after they popped up.

    The text (either on top, or in status bar area) solved my problem of the userform not interfering with my sheet.

    Many thanks.

    P.S. Can anyone place an icon on the toolbar programatically (on the fly) to indicate sheet protection using a red circle for a protected sheet and a green circle for an unprotected sheet. Like a stop light indicator on the toolbar.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1