Page 33 - Excel Progamming Weekend Crash Course
P. 33
d540629 ch01.qxd 9/2/03 9:27 AM Page 8
8 Friday Evening
selecting Tools ➪ Macro ➪ Visual Basic Editor from the menu. The VBA Editor is shown in
Figure 1-1. The blank window is where you enter your program’s VBA code. Other elements
in the Editor provide tools for organizing, running, and debugging your programs. Later ses-
sions cover these features.
Figure 1-1 The VBA Editor
The Excel Object Model
The other essential component of Excel programming is the Excel object model. To under-
stand the object model, it helps to have some background information about the inner
workings of programs such as Excel.
Objects
As computer programming evolved over the years, programs have gotten more powerful and,
unavoidably, more complicated. With increasing complexity came an increased possibility of
errors, and programmers found themselves spending more and more time tracking down and
fixing the causes of these errors. It soon became apparent that many, if not most, program
errors were caused by unexpected and unintended interactions between various parts of a
program. If a programmer could reduce or eliminate these interactions, errors would be dras-
tically curtailed.
At the same time, programmers found themselves writing the same program functionality
over and over again. Most Windows programs have a menu, for example, and programmers