Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Path
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 Matlac ----------------------------------------------------------------------- Brian Matlack's Profile: http://www.excelforum.com/member.php...nfo&userid=350 View this thread: http://www.excelforum.com/showthread.php?threadid=49787 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Path
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. -- http://HelpExcel.com 1-888-INGENIO 1-888-464-3646 x0197758 "Brian Matlack" wrote: Hi! I started out in Lotus 123. In that application if I told a macro to "Branch" to another macro it would run that macro and then end. If I told it to "Run" a macro it would run that macro and then return to the original macro and continue on. How does it work in Excel VBA? I currently use an IF and then END statement to "Branch" to another macro but is there a better way? Any help or examples would be greatly appreciated. -- Brian Matlack ------------------------------------------------------------------------ Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508 View this thread: http://www.excelforum.com/showthread...hreadid=497878 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Path
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" wrote in message news:Brian.Matlack.2144cm_1136382002.1785@excelfor um-nospam.com... Hi! I started out in Lotus 123. In that application if I told a macro to "Branch" to another macro it would run that macro and then end. If I told it to "Run" a macro it would run that macro and then return to the original macro and continue on. How does it work in Excel VBA? I currently use an IF and then END statement to "Branch" to another macro but is there a better way? Any help or examples would be greatly appreciated. -- Brian Matlack ------------------------------------------------------------------------ Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508 View this thread: http://www.excelforum.com/showthread...hreadid=497878 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
File Path - Macro | Excel Worksheet Functions | |||
How to remove path from macro reference | Excel Discussion (Misc queries) | |||
Macro for changing path in macro | Excel Programming | |||
File Path Macro | Excel Programming | |||
How to lock the path to a macro | Excel Programming |