Hi,
Selection.OnAction = "macro1"
I know that the above code can run macro1 once we click the shape.
Is it possible to run more than one macro?
Thanks
Printable View
Hi,
Selection.OnAction = "macro1"
I know that the above code can run macro1 once we click the shape.
Is it possible to run more than one macro?
Thanks
Yeah, in Macro1 call the other macro at the appropriate point.
[VBA]
Sub Macro1
Macro2
Macro3
Macro4
End Sub
[/VBA]
Paul
Hmmmm... Shouldn't that be
[VBA]
Sub Macro 1()
Call Macro 2
Call Macro 3
Call Macro 4
[/VBA]
I hadn't intended that the '2' and '3' and '4' be passed parameters
Since the OP used 'Macro1', I just continued with parameter-less subs.
[VBA]
Option Explicit
Sub macro1()
Macro2
Macro3
Macro4
End Sub
Sub Macro2()
MsgBox "Hello from Macro2"
End Sub
Sub Macro3()
MsgBox "Hello from Macro3"
End Sub
Sub Macro4()
MsgBox "Hello from Macro4"
End Sub
[/VBA]
BTW, the 'space' in
[VBA]
Sub Macro 1()
[/VBA]
must have been a typo or a tags format problem, since you can't define a Sub name with a space in it
Paul
Yes it was, thanks Paul