Display variable in userform
Make myVar public - ie don't declare it in a sub, but before the first sub
put the line
Public myVar as variant
Then in your userform code you can refer to it.
Sam
"PJ" wrote:
I would like to use custom userforms for various dialog boxes, error
trapping, etc. and wanted to know if it is possible to reference a string
variable on a userform. For example, say I have a variable called myVar in
my code and certain conditions are met where I want to display a userform. I
want to add a label with text on the userform and have it display the value
of myVar. Is there a way to do this?
|