Skip to main content

Run menu


Command Description Toolbar button Keyboard shortcut
Break Stops execution of a program while it's running and switches to break mode.

Any statement being executed when you choose this command is displayed in the Code window with Breakpoint in the left margin if you selected the Margin Indicator bar on the Editor Format tab of the Options dialog box.

If the application is waiting for events in the idle loop (no statement is being executed), no statement is highlighted until an event occurs.

Some editing changes made in break mode may require you to restart your program for the changes to take effect.


Design Mode, Exit Design Mode

Command Description Toolbar button
Design Mode Turns design mode on per project and then changes to Exit Design Mode. Design mode is the time during which no code from the project is running and events from the host or project will not execute. You can leave design mode by executing a macro or using the Immediate window.
Exit Design Mode Turns design mode off per project and clears all module level variables in the project.

Reset Project, Run Project, Stop Project

Command Description Toolbar button
Reset Project Clears the Call stack and clears the module level variables.
Run Project Puts the project into a mode in which it can be used by other applications. This is used to debug and test the stand-alone project before building a dynamic-link library (DLL) (DLL) from it. The current project is registered, replacing any existing registration information for the project (the registry information for an existing DLL version of the project, for example).
Stop Project Unregisters the project, and restores any previous registry information. This makes the in-memory project no longer able to be called from other applications.

NOTES: The Run Project and Stop Project commands are available only to the current stand-alone project. They are not available to host application document projects. This feature is not available in all versions of the Visual Basic Editor.

Run Sub/User Form, Continue, Run Macro

Command Description
Run Sub/UserForm Runs the current procedure if the cursor is in a procedure, or runs the form if a form is currently active. This command becomes the Continue command when you are in break mode.

If neither the Code window nor the UserForm window is active, this command becomes the Run Macro command.

Continue Resumes running the current procedure or form.
Run Macro Runs the macro.

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>