To Run a Macro from the VBA IDE (VBA/ActiveX)

Macros can be executed from a loaded VBA project file.

  1. On the ribbon, click Manage tab Applications panel Visual Basic Editor.
  2. In the VBA IDE, in a code window, position the cursor over the function or subroutine you want to execute.
  3. From the Run menu, click Run Macro.

    If the cursor is not positioned inside a function or subroutine, or a form is not current, the Macros dialog box is displayed. Select the macro to execute and click Run.