Expand Minimize

Step Into, Step Over, Step Out Commands (Debug Menu)

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

Step Into

Executes code one statement at a time.

When not in design mode, Step Into enters break mode at the current line of execution. If the statement is a call to a procedure, the next statement displayed is the first statement in the procedure.

At design time, this menu item begins execution and enters break mode before the first line of code is executed.

If there is no current execution point, the Step Into command may appear to do nothing until you do something that triggers code, for example click on a document.

Toolbar button: Gg251651.tbr_stpi_ZA01201749(en-us,office.14).gif. Keyboard shortcut: F8.

Step Over

Similar to Step Into. The difference in use occurs when the current statement contains a call to a procedure.

Step Over executes the procedure as a unit, and then steps to the next statement in the current procedure. Therefore, the next statement displayed is the next statement in the current procedure regardless of whether the current statement is a call to another procedure. Available in break mode only.

Toolbar button: Gg251651.tbr_stpo_ZA01201750(en-us,office.14).gif. Keyboard shortcut: SHIFT+F8.

Step Out

Executes the remaining lines of a function in which the current execution point lies. The next statement displayed is the statement following the procedure call. All of the code is executed between the current and the final execution points. Available in break mode only.

Toolbar button: Gg251651.tbr_stot_ZA01201748(en-us,office.14).gif. Keyboard shortcut: CTRL+SHIFT+F8.

Community Additions

ADD
Show:
© 2014 Microsoft