About this lesson
How to step through a macro line by line in order to aid in debugging.
Download this lesson’s exercise file.Step vs Run
Step vs Run
Understanding how to debug code using the Step feature.
When to use
When you need to execute a macro line by line, to see what is happening along the way.
The Step Into button on the Debugging toolbar allows you to execute the macro line by line.
- The active line of code which is about to be executed will be highlighted in yellow.
- Move the execution point up or down by dragging the yellow arrow next to the highlighted line and dropping it on the line of code you would like to execute.
Run & Stop
- Run the remaining portion of the macro by clicking the Play button (green arrow) on the Debugging toolbar.
- Stop running a macro by clicking Reset button (blue square) on the Debugging toolbar.
Hints & tips
- You can also press F8 to run Step Into.
- Press F5 to run the macro.
- Stepping and running can be used in combination; step the first few lines of code and then run the rest with the Play button (or F5), or stop with the Reset button.
Lesson notes are only available for subscribers.