0 votes
in VBA by Beginner (23 points)
Debug drop down options
by Beginner (0 points)
<RT.M>
 
The initial answer to all of your questions is in the Excel build in Help in the debugger.  Is there something in those definitions you don't understand?
 

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:    Toolbar button. 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:    Toolbar button. 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.

Run to Cursor Command (Debug Menu)

When your application is in design mode, use Run To Cursor to select a statement further down in your code where you want execution to stop. Your application will run from the current statement to the selected statement and the current line of execution margin indicator, Margin Indicator icon appears in the Margin Indicator bar.

You can use this command, for example, to avoid stepping through large loops.

Keyboard shortcut:  CTRL+F8.

ofm

© 2010 Microsoft Corporation. All rights reserved.

 
Edit Watch Command (Debug Menu)

Displays the Edit Watch dialog box in which you can edit or delete a watch expression. Available when the watch is set even if the Watch window is hidden.

This command displays the "Watch Window". It allows you to "watch" the current value of variables displayed in the Watch Window

 

 

Set Next Statement Command (Debug Menu)

Sets the execution point to the line of code you choose. You can set a different line of code to execute after the currently selected statement by selecting the line of code you want to execute and choosing the Set Next Statement command or by dragging the Current Execution Line margin indicator to the line of code you want to execute.

Using Set Next Statement, you can choose a line of code located before or after the currently selected statement. When you run the code, any intervening code isn't executed. Use this command when you want to rerun a statement within the current procedure or to skip over statements you don't want to execute. You can't use Set Next Statement for statements in different procedures.

Toolbar shortcut:    Toolbar button. Keyboard shortcut:  CTRL+F9.

ofm

© 2010 Microsoft Corporation. All rights reserved.

by Beginner (23 points)
Thanks Ron.

What do you mean when you say "in design mode" & "outside design mode"?
by Beginner (0 points)
+1
Design mode is entered when in the vba screen, you can click the pnecil and ruler icon next to the stop button. This puts the vba into "design Mode" so you can do things around certain macro's.

 

I use it when i need to save a spreadsheet against a macros rule (i.e. do not allow saving if cell A1 is blank)

Please log in or register to answer this question.

Welcome to wellsr Q&A
wellsr Q&A is the VBA and Python programming community that rewards you for learning how to code.

Earn free prizes for asking VBA and Python questions and for answering questions asked by others in our community.

What makes us different?
Our points system rewards you with a chance for free gifts based on the quality of your questions and/or answers. Users that ask great questions, may be given complimentary gift cards or training material.

Getting Started
Register

So, why don't you join us? It really is a neat way to reward the most dedicated members in our VBA and Python community.

For more programming tips visit the VBA Tutorials Blog and the Python Tutorials Blog.

...