Workbook protection activates after every change

Limone

Board Regular
Joined
Dec 20, 2018
Messages
57
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:

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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.
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,514
Messages
6,114,078
Members
448,547
Latest member
arndtea

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top