View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rowan Drummond[_3_] Rowan Drummond[_3_] is offline
external usenet poster
 
Posts: 414
Default Protection within Macro

Sheets("MySheet").unprotect password:="mypassword"
'do whatever
Sheets("MySheet").protect password:="mypassword"

Hope this helps
Rowan

NickMinUK wrote:
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 I
have unprotected/reprotected with no password, but clearly this is of
minimal use. Any help most gratefully received. Nick