Using The Visual Basic Editor

feint

To make the Visual Basic Editor easier to navigate, Microsoft provides different shortcut keys. These shortcuts work when the Visual Basic Editor window has focus. A window has focus when it is the selected window. For example, you can only type text in the selected window.

SHORTCUT KEY

DESCRIPTION

F7

Switches to the Code window for the selected object (node) in the Project Explorer. If the Code window for that object is not open, it opens and displays on top of any other code windows.

F4

Switches to the Property window and displays the properties for the selected object. If the Property window is not open, the Visual Basic Editor opens it in the location where you last viewed it.

Ctrl+R

Switches to the Project Explorer. If the Project Explorer window is not open, the Visual Basic Editor opens it in the location where you last viewed it.

Alt+F11

Toggles between the Visual Basic Editor and Excel. This shortcut is useful when you step through a macro. See Chapter 8 for more information on stepping through a macro to debug it.

F1

Displays online help on the item selected in the Code window.

Shift+F2

Displays a definition of the selected function or subroutine in the Code window.

] File Edit View Insert Format lools Data Window Help

File Edit View Insert Format Debug Run lools Add-Ins Window Help

•• - u * * « m ■ • • • | > h «a a) u

Jïypëa question for help

] File Edit View Insert Format lools Data Window Help

File Edit View Insert Format Debug Run lools Add-Ins Window Help

•• - u * * « m ■ • • • | > h «a a) u

Jïypëa question for help

OPEN THE VBE FROM THE MACRO DIALOG BOX_

0 Click to highlight the macro you want to modify.

■ The Visual Basic Editor displays the code for the selected macro in the Code window.

-■ The module containing the macro is highlighted in the Properties window.

OPEN THE VBE FROM THE MACRO DIALOG BOX_

Q Open the Macro dialog box by clicking Tools O Macro O Macros.

0 Click to highlight the macro you want to modify.

L-0 Select Edit.

■ The Visual Basic Editor displays the code for the selected macro in the Code window.

-■ The module containing the macro is highlighted in the Properties window.

EXCEL PROGRAMMING

0 0

Post a comment