C
c1802362
If I want to keep a variable in memory through several macros, I can
retain the variable value if I dim it above the subroutines in the
module
So, in module 1:
Dim String1 as String
Sub test1()
string1 = " test"
end sub
sub test2()
msgbox string1
end sub
the value of string1 is retained into sub test2, test 3, etc
However, all my attempts to retain the value of string1 from module 1
to another module nulls the value of string1.
How do I maintain the value of a variable across modules, not only
within a module?
Art
retain the variable value if I dim it above the subroutines in the
module
So, in module 1:
Dim String1 as String
Sub test1()
string1 = " test"
end sub
sub test2()
msgbox string1
end sub
the value of string1 is retained into sub test2, test 3, etc
However, all my attempts to retain the value of string1 from module 1
to another module nulls the value of string1.
How do I maintain the value of a variable across modules, not only
within a module?
Art