Subscriber only lesson.
Sign up to this course to view this lesson.
Calling other macros
Lining multiple subroutines together
When to use
To call one macro from within another subroutine
It is a best practice to create a "Master" routine that calls smaller sub-macros instead of writing one long macro
Benefits of calling other macros
- Allows for easier debugging
- Allows you to re-use routines should you need them more than once
Syntax for calling another macro
Setting Macros to Private
- Optionally, you can insert the word Private before Sub when creating a Macro
- Private Subs do not show up in Excel's Macro dialog
- Private Subs can still be called from other macros in the same code module
Hints & tips
- The Call keyword is optional, but recommended as it makes your code easier to read later
Lesson notes are only available for subscribers.