Hello!
1. On a new workbook, uncheck protection for one cell (ex, A1).
2. For sheet protection, uncheck all but "Select unlocked cells".
3. Run the following code to protect all sheets in the workbook.
4. If the cursor is in A1 when you run the code, it all works smoothly.
5. If the cursor is in other than A1, the sheet still protects, but you get a error message (1004: Method 'Goto of object'_Aplication' failed).
The problem is that code is trying to protect the whole sheet including the locked cell that the cursor is sitting on.
I was thinking that maybe the code could jump to an unlocked cell before running, but then I have some "info-only" sheets where all the cells are locked (so there is nowhere to jump to.)
Anyone know how to fix this?
Respectfully,
Lost
Please Login or Register to view this content.
Bookmarks