Datasheet

Book VIII
Chapter 1
What the Heck
Is VBA?
Using the Visual Basic Editor
579
Using the Code window
The Code window is where you type your VBA code. Similar to a word
processor or text editor, the Code window supports all the standard
Windows text-editing techniques. You can type text and use the Backspace
and Delete keys on your keyboard to delete text. You can use the Tab key to
indent text. You can select text by dragging the mouse pointer through it.
You can copy and paste text to, and from, the Code window. In short, the
Code window is a text editor.
The Code window acts like the document window in most other programs.
Click its Maximize button, shown near the mouse pointer at the top of
Figure 1-9, to enlarge it. To restore it to its previous size, click the Restore
Window button, shown at the bottom of that same figure.
Tools in the Code window are pointed out in Figure 1-10 and summarized
in the following list:
Object box: When you’re viewing a class module, this box shows the
name of the object associated with the current code and allows you to
choose a different object. In a standard module, only the word
General
appears because a standard module isn’t associated with any specific
form or report.
Procedure/Events box: When you’re viewing a class module, this box
lists events supported by the object whose name appears in the Object
box. When viewing a standard module, the Procedure/Events box lists
the names of all procedures in that module. To jump to a procedure or
event, just choose its name from the drop-down list.
Figure 1-9:
Code
Windows
Maximize
and Restore
Window
buttons.
38_036494 bk08ch01.qxp 11/17/06 8:34 AM Page 579