#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.misc
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Public Macro Help (CFColorindex) carl Excel Worksheet Functions 3 April 14th 06 12:08 AM
Using A Public Function / carl Excel Worksheet Functions 1 April 6th 06 09:13 PM
Public variable Jack New Users to Excel 4 March 18th 06 09:35 PM
Public Curiosity BillCPA Excel Discussion (Misc queries) 1 December 5th 05 10:33 PM
Public Function Monty Excel Discussion (Misc queries) 9 December 24th 04 06:35 PM


All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"