+ Reply to Thread
Results 1 to 5 of 5

Protect/Unprotect sheet change detection -vba

  1. #1
    Registered User
    Join Date
    08-30-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    12

    Protect/Unprotect sheet change detection -vba

    Situation:
    I have 5 sheets in my workbook.

    Sheet1
    Sheet2
    Sheet3
    Sheet4
    DetectionSheet

    This is my question:

    Is there a possibility that when a user CHANGE the protection (protect/unprotect) of a Sheet(1-4) content, the NAME of the sheet will be throw and catch(it will be written in a cell) by the DetectionSheet

    Example:

    I change the protection of Sheet1 and Sheet2

    "DetectionSheet" have [A1]Sheet1, [A2]Sheet2

    AND when I remove the protection(Unprotect) it will be deleted in the "DetectionSheet".

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Protect/Unprotect sheet change detection -vba

    Not completely what you actually wants.. but will give you an idea, in which way you need to go..

    Place this code in DetectionSheet

    Please Login or Register  to view this content.
    will modify with more validation if its in correct direction..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,438

    Re: Protect/Unprotect sheet change detection -vba

    You can hook into the Tools > Protection > Protect sheet, event

    standard code module
    Please Login or Register  to view this content.
    clas Class1 module
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Protect/Unprotect sheet change detection -vba

    Hi Andy..

    in which trigger / event.. the value will reflect.. in DetectionSheet!!

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,438

    Re: Protect/Unprotect sheet change detection -vba

    The class object catches the clicking of the menu button. It then uses OnTime to run the LogProtection routine. This allows the dialog to appear and the macro will not execute until the use clears the dialog either by cancel or setting/unsetting protection.

    The activesheets index is used to output information on the DetectionSheet, using the index as the row position.

    To test you will need to run the Main macro then alter sheet protection on a sheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Protect unprotect multiple sheet
    By amitkr3855 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-28-2013, 10:23 AM
  2. [SOLVED] Protect & unprotect sheet and workbook
    By Ignesh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2012, 05:54 AM
  3. Protect and Unprotect a sheet
    By Shazz in forum Excel General
    Replies: 2
    Last Post: 03-15-2012, 10:27 AM
  4. protect/unprotect sheet
    By fatalcore in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-03-2012, 09:34 AM
  5. protect then unprotect sheet
    By dealer in forum Excel General
    Replies: 4
    Last Post: 10-19-2010, 12:54 PM

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