ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unprotecting worksheet in a macro. (https://www.excelbanter.com/excel-programming/271950-unprotecting-worksheet-macro.html)

Mark F.

Unprotecting worksheet in a macro.
 
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.


Tom Ogilvy

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.





All times are GMT +1. The time now is 08:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com