D
Dave Peterson
Does the variable change?
If no, then you could use:
Public Const myConst As String = "hi there"
If yes, you could declare the variable as public, but then set it to its
original value in the workbook_open event or auto_open procedure.
Or you could be careful and check it before you try to use it:
Public VarsPopulated as boolean
public myVar as long
----
in some procedure:
if varspopulated = false then
call PopulateVars
end if
=========
Sub PopulateVars()
VarsPopulated = true
myVar = 1234
End Sub
If no, then you could use:
Public Const myConst As String = "hi there"
If yes, you could declare the variable as public, but then set it to its
original value in the workbook_open event or auto_open procedure.
Or you could be careful and check it before you try to use it:
Public VarsPopulated as boolean
public myVar as long
----
in some procedure:
if varspopulated = false then
call PopulateVars
end if
=========
Sub PopulateVars()
VarsPopulated = true
myVar = 1234
End Sub