![]() |
Public Password
I have a series of forms that gather information and save it to various sheets.
Each form needs to save this information to protected sheets, I use ActiveSheet.Unprotect "xxx" When I open the form and then close it with ActiveSheet.Protect "xxx" I would like to have one central point to able to change the password as necessary I have played around with the public statement with no luck, any suggestions Thanks Simon Brewster |
Public Password
At the top of a General module--not behind ThisWorkbook and not behind a
worksheet: Option Explicit Public Const myPWD as string = "xxx" 'then any code can use that myPWD constant sub testme() activesheet.unprotect password:=mypwd end sub Excel 2003 - SPB wrote: I have a series of forms that gather information and save it to various sheets. Each form needs to save this information to protected sheets, I use ActiveSheet.Unprotect "xxx" When I open the form and then close it with ActiveSheet.Protect "xxx" I would like to have one central point to able to change the password as necessary I have played around with the public statement with no luck, any suggestions Thanks Simon Brewster -- Dave Peterson |
Public Password
Thanks Works great, sometimes the simples things get by me :)
"Dave Peterson" wrote: At the top of a General module--not behind ThisWorkbook and not behind a worksheet: Option Explicit Public Const myPWD as string = "xxx" 'then any code can use that myPWD constant sub testme() activesheet.unprotect password:=mypwd end sub Excel 2003 - SPB wrote: I have a series of forms that gather information and save it to various sheets. Each form needs to save this information to protected sheets, I use ActiveSheet.Unprotect "xxx" When I open the form and then close it with ActiveSheet.Protect "xxx" I would like to have one central point to able to change the password as necessary I have played around with the public statement with no luck, any suggestions Thanks Simon Brewster -- Dave Peterson |
All times are GMT +1. The time now is 01:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com