I have a sub, inside this sub i call another sub. How do I get the variables from the latter sub to carry over to the firsts sub. Example below.
when I attempt to calculate "q" as seen above, the value of "z" from subnum2 is not carried back up. How can I fix this?
Code:
sub subnum1()
x = 5
y = 8
call subnum2
q = x + y + z
msgbox q
end sub
sub subnum2()
z = 9
end sub