Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can you execute a macro within another macro.
Example: Run macro a in macro b. Cutting and pasting does not seem to work. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub hello()
Call boxit End Sub Sub boxit() MsgBox ("in boxit") End Sub -- Gary's Student "norrislaketn" wrote: How can you execute a macro within another macro. Example: Run macro a in macro b. Cutting and pasting does not seem to work. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Something like this..
Sub Macro1() msgbox "macro1" call Macro2 exit sub Sub Macro2() msgbox "macro2" exit sub -- HTH... Jim Thomlinson "norrislaketn" wrote: How can you execute a macro within another macro. Example: Run macro a in macro b. Cutting and pasting does not seem to work. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Macro1()
Msgbox "Macro1" ' some code Macro2 End Sub Sub Macro2() Msgbox "Macro2" ' some code Macro3 Macro4 End Sub Sub Macro3() Msgbox "Macro3" ' some code End Sub Sub Macro4() Msgbox "Macro4" ' some code End Sub Regards Trevor "norrislaketn" wrote in message ... How can you execute a macro within another macro. Example: Run macro a in macro b. Cutting and pasting does not seem to work. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the info. Your solution will run if I step into it. If I run ir
directly from the macro shortcut key it does not run. It acts as if it is executing the next command before the call is complete. Any other thoughts? "Gary''s Student" wrote: Sub hello() Call boxit End Sub Sub boxit() MsgBox ("in boxit") End Sub -- Gary's Student "norrislaketn" wrote: How can you execute a macro within another macro. Example: Run macro a in macro b. Cutting and pasting does not seem to work. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the info. Your solution will run if I step into it. If I run ir
directly from the macro shortcut key it does not run. It acts as if it is executing the next command before the call is complete. Any other thoughts? "Trevor Shuttleworth" wrote: Sub Macro1() Msgbox "Macro1" ' some code Macro2 End Sub Sub Macro2() Msgbox "Macro2" ' some code Macro3 Macro4 End Sub Sub Macro3() Msgbox "Macro3" ' some code End Sub Sub Macro4() Msgbox "Macro4" ' some code End Sub Regards Trevor "norrislaketn" wrote in message ... How can you execute a macro within another macro. Example: Run macro a in macro b. Cutting and pasting does not seem to work. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks for the info. Your solution will run if I step into it. If I run ir directly from the macro shortcut key it does not run. It acts as if it is executing the next command before the call is complete. Any other thoughts? "Jim Thomlinson" wrote: Something like this.. Sub Macro1() msgbox "macro1" call Macro2 exit sub Sub Macro2() msgbox "macro2" exit sub -- HTH... Jim Thomlinson "norrislaketn" wrote: How can you execute a macro within another macro. Example: Run macro a in macro b. Cutting and pasting does not seem to work. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |