Results 1 to 5 of 5

Thread: Workbook protection activates after every change
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Dec 2018
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Workbook protection activates after every change

    I realize this is a dumb question.

    I originally costumized this workbook so that people at my old job could use it without editing any of the structure behind it. Now I'm back to working on it, but everytime I launch a macro and the like, the workbook protection gets turned back on after I'd previously removed it to try the new code and this is making it very tedious to work on the file. I looked through it and I can't find any code that seems to be causing it.

    Anyone knows how I can solve this problem? Thx in advance.
    Last edited by Limone; Sep 22nd, 2019 at 08:43 AM.

  2. #2
    Board Regular
    Join Date
    Dec 2008
    Posts
    6,657
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Workbook protection activates after every change

    Quote Originally Posted by Limone View Post
    I looked through it and I can't find any code that seems to be causing it.
    There must be some code somewhere that is doing it, assuming that we're talking about regular protection (As in the manual method of Review tab - Protect sheet), see if you can find it with this.

    Go to any vba module in the offending workbook
    Press ctrl f, then enter .Protect in the search box
    Change the search radio button to Current Project
    Click on Find Next

    Note that this may not detect the code in any hidden / protected modules.

  3. #3
    Board Regular
    Join Date
    Dec 2018
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Workbook protection activates after every change

    Assuming I hid or protected the module at some point and don't remember, how can I find it? Was a complete beginner in a mad rush to finish the project and with no one to help me at that point, I'm sure I did some dumb stuff that's now coming back to bite me.

  4. #4
    Board Regular
    Join Date
    Dec 2018
    Posts
    57
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Workbook protection activates after every change

    I copied the two worksheets I need to a new workbook and it still happens.

  5. #5
    Board Regular
    Join Date
    Dec 2008
    Posts
    6,657
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Workbook protection activates after every change

    The hidden modules would still be visible in the project explorer (the directory tree with the modules in the top left corner of the vba window), you just wouldn't be able to select them.

    If it's happening when you copy the sheets to a new workbook then either the protection code is in the worksheet module and is being copied with the sheet, or it is in your personal.xlsb workbook.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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