Using VBA to protect & unprotect cells
Posted by Tom on April 27, 2001 6:33 PM
This is sort of a followup to my previous question. I want to protect a range of cells, then unprotect them so I can create a new worksheet by copying and pasting the original, then re-protect the original worksheet and the new, copied worksheet. I'm trying to use this code:
Selection.Locked = True
Then I use the following to copy the worksheet and create a new one:
Application.CutCopyMode = False
When the original protect routine is called for the first time, everything works fine. The unprotect command also works. But when the protect routine is called from within the AddNewSheet routine, nothing gets protected again. Thanks in advance for your help.