Microsoft Office Tutorials and References
In Depth Information
Typing and Editing in the Code Window
The Immediate window displays 10.65 because 10 times 1.065 equals 10.65.
Figure 2-10 shows the function and the Immediate window.
Figure 2-10:
Sample
function
tested in the
Immediate
window.
Typing and Editing in the Code Window
For a procedure to actually do anything, it has to contain some valid VBA
code. As you type statements in the Code window, Visual Basic Editor offers
a little help along the way. Figure 2-11 shows an example. As you type your
line of code and get to a place where only certain words are allowed, a
dropdown menu appears to let you know what those words are. This
autocomplete feature is IntelliSense, which assists you in writing code.
Figure 2-11:
Drop-down
menu of
acceptable
words.
As you continue to type, the drop-down menu moves down to the first item
that matches what you’ve typed so far. Rather than type the whole word, you
can type until the selected item in the drop-down menu matches what you
intend to type; then press Enter. The word in the menu replaces what
you’ve typed so far. Choosing a word from the drop-down menu saves you
some typing and also ensures that the word is spelled correctly.
Search JabSto ::




Custom Search