Create a macro that runs other macros


I’ve recorded some macros and now want to have them all run one after another. Is this possible?


Of course it possible!
Just write a new procedure, which will cause the old macros in the right order. You can use the Call statement or simply specify the name of an existing macro. For example, as follows:

Sub myOldMacro1()
End Sub

Sub myOldMacro2()
End Sub

Sub totalСall
  Call myOldMacro1()  ' With Call statement
  For i = 1 to 10
    myOldMacro2()     ' Without Call statement
  Next i
  myOldMacro1()       ' Without Call statement again
End Sub

Every one of your old macros must have a unique name (to know the Basic which of macro is invoked in each case).

Thanks! I’ve got it done now :slight_smile: