Unprotecting worksheet in a macro.

M

Mark F.

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.
 
T

Tom Ogilvy

ActiveSheet.Unprotect Password:="ABCD"

ActiveSheet.Protect Password:="ABCD"

Regards,
Tom Ogilvy
 

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

Top