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 gstrMyGlobalCon stant As String
Public gstrAnotherGlob alConstant 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:
gstrMyGlobalCon stant = "Hello"
gstrAnotherGlob alConstant = "Alan"
In order to now place BOTH values into one variable you could use:
myvar = gstrMyGlobalCon stant & " " & gstrAnotherglob alConstant
the result would be: "Hello Alan"
OR
myvar = gstrMyGlobalCon stant
myvar= myvar & " " & gstrAnotherGlob alConstant
the result would again be: "Hello Alan"
Hope this helps.
Tom
"Colleyvill e Alan" <ae***********@ nospam.comcast. net> wrote in message
news:hQ5Xb.3019 71$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?