Macro Path

  • Thread starter Thread starter Brian Matlack
  • Start date Start date
B

Brian Matlack

Hi!
I started out in Lotus 123. In that application if I told a macro t
"Branch" to another macro it would run that macro and then end. If
told it to "Run" a macro it would run that macro and then return to th
original macro and continue on.
How does it work in Excel VBA? I currently use an IF and then EN
statement to "Branch" to another macro but is there a better way?
Any help or examples would be greatly appreciated
 
Brian,

In VBA you are calling other functions and/or subroutines. After a
function/subroutine that you have called has completed, control will return
from the function/subroutine from which you placed the call.
 
Just call the other macro from within your code

Sub CallerMacro()
Msgbox "hello"
' more code

CalledMacro

' more code
End Sub

Sub CalledMacro()
...
End Sub

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Brian Matlack" <[email protected]>
wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top