Alan,
I create a module to put all my global public variables in.
Each variable is prefaced with the word "Public" (g for global)
i.e. Public gstrMyGlobalConstant As String
Public gstrAnotherGlobalConstant as string
These variables can then be set from anywhere in the program and the
value will remain even after the procedure which set them is complete.
In response to your code as listed in your original note, I think you may
want to try something a bit different such as:
gstrMyGlobalConstant = "Hello"
gstrAnotherGlobalConstant = "Alan"
In order to now place BOTH values into one variable you could use:
myvar = gstrMyGlobalConstant & " " & gstrAnotherglobalConstant
the result would be: "Hello Alan"
OR
myvar = gstrMyGlobalConstant
myvar= myvar & " " & gstrAnotherGlobalConstant
the result would again be: "Hello Alan"
Hope this helps.
Tom
"Colleyville Alan" <ae***********@nospam.comcast.net> wrote in message
news:hQ5Xb.301971$xy6.1484743@attbi_s02...
I seem to recall reading somewhere that there was a keyword that allowed a
variable to have data added to it without losing its contents.
a = "Hi " and
b = "There"
myvar = a
myvar = b
the value of myvar after this would be "Hi There".
How do you do accomplish this?