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
|