Thread: Public Variable
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Juan Pablo González Juan Pablo González is offline
external usenet poster
 
Posts: 226
Default Public Variable

Jason wrote:
Can someone explain how to assign a public variable to my whole
workbook so that it is recognized by all sheets? I want my password
as a variable so that I don't have to change it in one place verses
all of my sheets.

Any help thanks in advance.


How are you storing it now ? because you could use a workbook name (possibly
hidden to add one layer of security), but if all you want is a public
variable, then put something like

Public ThePassword As String

at the top of one standard module.

You can define it as a constant, like

Public Const ThePassword As String = "123456"

--
Regards,

Juan Pablo González