26. VBA Tips - Call Code From Another Workbook

Nick's picture


In this VBA tip, we'll learn how to call code from another workbook:

  • The way to do this is to use Application.Run

Here's the code:

call-code-from-another-workbook

To replicate:

  1. Open both the example workbooks
  2. Press the button.
  3. You will then see a message box saying that the other code is being run.
  4. The Syntax for Application.Run  is: "WorkbookName.xls!MacroName"
  5. Using this tip, you can run all the macros from one workbook using another workbook.

Training Video on how to Call Code From Another Workbook in Excel:

AttachmentSize
AnotherWorkbook.xls31 KB
call-code-from-another-workbook.xls49 KB