1119
Recording Simple Macros
Using Object Models
The fundamental building blocks of VBA remain the same, no matter which application
you’re using. An
IF statement in VBA/Word, for example, works like an IF statement in
VBA/Excel. That’s one of VBA’s great strengths, for as soon as you learn VBA with one
Office application, you can apply much of what you know to the other applications—or even
to non-Microsoft applications, such as Visio and AutoCAD, which use VBA as their macro
language.
Still, VBA has to accommodate the differences in each application. You work with words,
sentences, and bookmarks in Word, you use formulas, cells, and ranges in Excel, ...