View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Unprotecting worksheet in a macro.


ActiveSheet.Unprotect Password:="ABCD"

ActiveSheet.Protect Password:="ABCD"

Regards,
Tom Ogilvy


"Mark F." wrote in message
...
Does anyone know of a way to pass the password to
unprotect
a worksheet in a macro as well as re-protect the
worksheet by passing a password?

Thank you for your help.