Mackro

  • Thread starter Thread starter Nyheder
  • Start date Start date
N

Nyheder

Hey, is it possible to start a Macro from within another Macro.

How is it done.

Thanks in advance
 
Enter the name (nothing else) of the second macro on its own line.


Hey, is it possible to start a Macro from within another Macro.

How is it done.

Thanks in advance
 
I like to use the Call keyword:

Sub Mac1()
Call Mac2
End Sub

Sub Mac2
msgbox "I'm in mac2"
End sub
 
And I like specifying the parms by name:

Call MyWarningSubroutine("Pay!", 9, "Yo!")
becomes:
Call MyWarningSubroutine(Msg:="Pay!", WarningNo:=9, Caption:="Yo!")

Then when (not if!) I copy that line of code, I don't have to remember what
order those passed values have to be.
 
Back
Top