Run a Macro from Another Macro in Excel

Add to Favorites

I will show you how to run a macro from another macro in Excel.  This means that you can run any macro when you need to from a completely separate macro.

This is actually very simple!

Use Call in VBA.

Here is the macro we want to call or run using another macro:

Sub Macro_2()


MsgBox "Hi!"


End Sub

And here is the macro that will call or run this macro:

Sub Macro_1()


'call the second macro

Call Macro_2


End Sub

It is as simple as that.  Put Call in front of the name of the macro that you want to run.

Here is a screenshot of these two macros in Excel:

Download the spreadsheet for this tutorial, from below or the side-bar of this page, and you can test out these macros.


Downloadable Files: Excel File

Similar Content on TeachExcel
Automatically Run a Macro so Many Seconds, Minutes, or Hours After an Excel Workbook has been Opened
Macro: Run a macro after a certain amount of time has passed since the Excel workbook was ope...
Run a Macro when a User Does Something in the Worksheet in Excel
Tutorial: How to run a macro when a user does something in the worksheet, everything from selecting ...
Stop a Macro from Running in Excel
Tutorial: How to stop a macro from running after it has started. This method uses the keyboard and...
Run a Macro When a Specific Cell Changes in Excel
Tutorial: Run a macro in Excel when a specific cell is changed; this also covers when a cell within...
Run a Macro When you Click a Button in Excel
Tutorial: Make a macro run when you click a button in the worksheet in Excel. This allows you to cre...
Stop Excel Events from Triggering when Running a Macro
Tutorial: Create a macro that will run without triggering events, such as the Change event, or Activ...