Hi all,
I have a workbook with about 50 vba macros in it, and I need it protected from accidental overwrites of formulas.
I found the code to do this, and it can be seen in the code lines below:
ActiveSheet.Unprotect Password:="****"
ActiveSheet.Protect Password:="****", DrawingObjects:=True, Contents:=True, Scenarios:=True
This works beautifully - it has locked all cells I wanted, runs the macro, is colleague-proof...
Unfortunately it is also now me-proof.
I now want to edit some of the locked cells. When I unprotect the sheet manually I can select one spot, then I need to unprotect the sheet again to make a single change. Then unlock again to fill down... it wants to stay locked.
Is there a way to attach code to a single macro button (or other method) to unlock all cells and leave them unlocked until I make the changes, then relock upon running a macro through another button?
I don't want to have to remove all the lock / unlock coding in all the macros, make the changes, then put them back.
All advice gratefully received.
Bookmarks