Hi,
Excel 2013 VBA - I have this code and it appears to be working as a toggle, which is not right (?)
If Sheet01 is unprotected and I run the code below it becomes protected - you cannot type in cells that are locked
If I run the code again (no other changes), the previously protected Sheet01 become unprotected - you can type in cells that are locked. Also, the sheet still appears to be protected because clicking on "Unprotect Sheet" in the Review menu requires a password. (The menu icon shows as Unprotect versus Protect, even though the sheet is now unlocked.)
It seems to be toggling between protected and unprotected. Do I need to add something to this code to check if it is locked/unlocked? I've been using this code for years and never found this problem before.
I tried it again in a completely clean workbook and it does the same thing.Please Login or Register to view this content.
EDIT: If I list each sheet individually, the problem does not occur:
AHA - it seems to toggle only if DrawingObjects is includedPlease Login or Register to view this content.
I want users to be able to add comments, which is why DrawingOjbects is included.Please Login or Register to view this content.
Bookmarks