26. VBA Tips - Call Code From Another Workbook
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:
To replicate:
- Open both the example workbooks
- Press the button.
- You will then see a message box saying that the other code is being run.
- The Syntax for Application.Run is: "WorkbookName.xls!MacroName"
- 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:
Attachment | Size |
---|---|
AnotherWorkbook.xls | 31 KB |
call-code-from-another-workbook.xls | 49 KB |
»
- Nick's blog
- Login or register to post comments
- 30247 reads
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago