Thread: Public Password
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Excel 2003 - SPB Excel 2003 - SPB is offline
external usenet poster
 
Posts: 26
Default 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