Executing another Sub


Posted by Kevin B. on February 20, 2001 11:42 AM

How do I execute a sub-program then come back to where to where I left off?



Posted by Dax on February 20, 2001 2:13 PM

If you literally type the name of your sub program as a line into your main macro it will call that macro, run it, and return to the line after it was called.

e.g.
Dim X As Long, Y As Long
Main Sub
x=1
y=3
SUBCALLME
MsgBox (x+y)
End Sub


Sub SUBCALLME
x=x*2
y=y*3
End Sub