E
ExcelMonkey
I have passsed variables to subs before, but I do not know how to pas
variables declared in private subs back up to the main sub that calle
it. This is a variable scope question.
I have a main sub which calls two other private subs within it
routine. I need to find a way to make sure that the two private sub
share the same variable and value.
Upon calling the first private sub I declare a variable "X" (withi
this private sub) and pass a value to it "1". I need to pass thi
variable"X" back up to the main sub so that it can be passed to th
second private sub when it is called? So when the second sub i
called, it has access to the "X" and it knows its value ("1") is what
deemed it to be in the first sub. How do I do this?
I am assuming another way around this would be to declare the variabl
before any of the subs so that it is available for all of teh subs.
Thank-yo
variables declared in private subs back up to the main sub that calle
it. This is a variable scope question.
I have a main sub which calls two other private subs within it
routine. I need to find a way to make sure that the two private sub
share the same variable and value.
Upon calling the first private sub I declare a variable "X" (withi
this private sub) and pass a value to it "1". I need to pass thi
variable"X" back up to the main sub so that it can be passed to th
second private sub when it is called? So when the second sub i
called, it has access to the "X" and it knows its value ("1") is what
deemed it to be in the first sub. How do I do this?
I am assuming another way around this would be to declare the variabl
before any of the subs so that it is available for all of teh subs.
Thank-yo