VBA – Run a Macro Line by Line

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on August 10, 2022

Here is how to run a macro one line at a time. This is useful sometimes when debugging, or resuming line by line from a breakpoint.

F8 is the key!

In the Visual Basic Editor, place your cursor inside of the macro and hit F8. This will run the first line of your code. Hit F8 to run each additional line, or F5 to resume without stopping.

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!

alt text

 

Learn More!

 

vba-free-addin

VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)

Free Download

Return to VBA Code Examples