Protection within Macro

  • Thread starter Thread starter NickMinUK
  • Start date Start date
N

NickMinUK

Is it possible to unprotect a protected sheet where a password is used
then re-protect with the same password, all within a macro. So far
have unprotected/reprotected with no password, but clearly this is o
minimal use. Any help most gratefully received. Nic
 
Sheets("MySheet").unprotect password:="mypassword"
'do whatever
Sheets("MySheet").protect password:="mypassword"

Hope this helps
Rowan
 
Thanks Rowan. It works, and now that I've discovered how to protect the
macro aswell, i reckon i'm pretty well covered.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top