ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   macro help (https://www.excelbanter.com/excel-discussion-misc-queries/169977-macro-help.html)

wamstrdad

macro help
 
Can you provide help on the VBA code to run multiple macros from a single
"super macro"? In other words, what is the code for a macro named XYZ to run
macros the macros named ABD, DEF and GHI?

Mike H

macro help
 
perhaps

Sub supermacro()
MsgBox "supermacro"
abd
def
ghi
MsgBox "and back to supermacro"
End Sub

Sub abd()
MsgBox "Abd"
End Sub

Sub def()
MsgBox "def"
End Sub

Sub ghi()
MsgBox "ghi"
End Sub


Mike
"wamstrdad" wrote:

Can you provide help on the VBA code to run multiple macros from a single
"super macro"? In other words, what is the code for a macro named XYZ to run
macros the macros named ABD, DEF and GHI?


Dave Peterson

macro help
 
Option Explicit
Sub XYZ()
call abd
call def
call ghi
end sub



wamstrdad wrote:

Can you provide help on the VBA code to run multiple macros from a single
"super macro"? In other words, what is the code for a macro named XYZ to run
macros the macros named ABD, DEF and GHI?


--

Dave Peterson


All times are GMT +1. The time now is 02:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com