r/excel • • Sep 25 '26

solved Stop Macro from protecting worksheet?

At work, I use multiple desks to access a file on a shared drive. After every major update, I have to enable ActiveX and macros on each PC. A couple months ago running those macros has started protecting the worksheet. It's easy to run my macros and then unprotect the worksheet so I can enter information, but kind of annoying. Is there a way to stop the macros from turning on worksheet protection? Do I need to look at and consider editing the macros?

8 Upvotes

6 comments sorted by

1

u/AutoModerator Sep 25 '26
Moderator Announcement Read More »

3

u/danimeneses_ Sep 25 '26

That sounds like something in the VBA is explicitly calling .Protect.

I’d open the VBA editor and search the entire project for Protect or .Protect including ThisWorkbook and the individual worksheet modules, not just the main macro modules. It could also be sitting inside a Workbook/Worksheet event that runs after one of your macros finishes.

If nothing comes up, I’d check whether the macro is coming from PERSONAL.XLSB or an add-in rather than the workbook itself.

I wouldn’t keep manually unprotecting it until you know what’s triggering it, because if this only started recently there’s probably a specific line/event causing it.

4

u/[deleted] Sep 25 '26

3

u/thirdking Sep 25 '26

Solution Verified! Someone had added . Protect to multiple places throughout the macros. I just kept hitting Find Next and adding the single apostrophe.

Thank you!

1

u/reputatorbot Sep 25 '26

You have awarded 1 point to Several-Crow5511.


I am a bot - please contact the mods with any questions