Muokkaa

Jaa


View menu

Command Description Toolbar button Keyboard shortcut
Call Stack Displays the Call Stack dialog box, which lists the procedures that have started but are not completed. Available only in break mode.

When Visual Basic is executing the code in a procedure, that procedure is added to a list of active procedure calls. If that procedure then calls another procedure, there are two procedures on the list of active procedure calls. Each time a procedure calls another Sub, Function, or Property procedure, it is added to the list. Each procedure is removed from the list as execution is returned to the calling procedure. Procedures called from the Immediate window are also added to the calls list.

You can also display the Call Stack dialog box by clicking the Calls button (...) next to the Procedure box in the Locals window.
Call Stack Toolbar button CTRL+L
Code Displays or activates the Code window for a currently selected object. Code Toolbar button F7
Definition Displays the location in the Code window where the variable or procedure under the pointer is defined. If the definition is in a referenced library, it is displayed in the Object Browser. SHIFT+F2
<Host application> Moves the host application on top of the Visual Basic Editor so that you can view it. The name of the command changes to the name of the host application. ALT+F11
Immediate Window Displays the Immediate window, and displays information resulting from debugging statements in your code or from commands typed directly into the window.

Use the Immediate window to:
- Test problematic or newly written code.
- Query or change the value of a variable while running an application. While execution is halted, assign the variable a new value as you would in code.
- Query or change a property value while running an application.
- Call procedures as you would in code.
- View debugging output while the program is running.
Immediate Window Toolbar button CTRL+G
Last Position Allows you to quickly navigate to a previous location in your code. Enabled only if you edited code or made a Definition command call and only when the Code window is displayed. Visual Basic only keeps track of the last 8 lines that were accessed or edited. CTRL+SHIFT+F2
Locals Window Displays the Locals window and automatically displays all of the variables in the current stack and their values. The Locals window is automatically updated every time you change from run time to break mode and every time the stack context changes. Locals Window Toolbar button
Object Browser Displays the Object Browser, which lists the object libraries, the type libraries, classes, methods, properties, events, and constants you can use in code, as well as the modules and procedures you defined for your project. Object Browser Toolbar button F2
Object Displays the active item. Object Toolbar button SHIFT+F7
Project Explorer Displays the Project Explorer, which displays a hierarchical list of the currently open projects and their contents. The Project Explorer is a navigational and management tool only. You cannot build an application from the Project Explorer. Project Explorer Toolbar button CTRL+R
Properties Window Displays the Properties window, which lists the design-time properties for a selected form, control, class, project or module. Properties Window Toolbar button F6
Tab Order Displays the Tab Order dialog box for the active Form. Tab Order Toolbar button
Toolbars Lists the toolbars that are built into Visual Basic and the Customize command. You can toggle the toolbars on and off, or drag the toolbars to different locations on you desktop.

Debug: Displays the Debug toolbar, which contains buttons for common debugging tasks.
Editor: Displays the Editor toolbar, which contains buttons for common editing tasks.
Standard: Displays the Standard toolbar, which is the default toolbar.
UserForm: Displays the UserForm toolbar, which contains buttons specific to the form.
Customize: Displays the Customize dialog box, where you can customize or create toolbars and your menu bar.
Toolbox Displays or hides the Toolbox, which contains the controls currently available to your application. Toolbox Toolbar button
Watch Window Displays the Watch window and the current watch expressions. The Watch window appears automatically if watch expressions are defined in the project. If the context of the expression isn't in scope when going to break mode, the current value isn't displayed. Watch Window Toolbar button

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.