Microsoft Office Tutorials and References
In Depth Information
1.3 Topics in Learning Excel Programming
1.3 Topics in Learning Excel Programming
In general, the education of an Excel programmer breaks down into a few main categories, as
follows.
The Visual Basic Editor
First, you need to learn a bit about the environment in which Excel programming is done.
This is the so-called Visual Basic Editor or Excel VBA Integrated Development
Environment (IDE for short). We take care of this in Chapter 3 and Chapter 4 .
The Basics of Programming in VBA
Next, you need to learn a bit about the basics of the programming language that Excel
uses. This language is called Visual Basic for Applications (VBA). Actually, VBA is used
not only by Microsoft Excel, but also by the other major components in the Microsoft
Office application suite: Access, Word, and PowerPoint. Any application that uses VBA
in this way is called a host application for VBA. (There are also a number of
nonMicrosoft products that use VBA as their underlying programming language. Among the
most notable is Visio, a vector-based drawing program.) It is also used by the standalone
programming environment called Visual Basic (VB).
We will discuss the basics of the VBA programming language in Chapter 5 through
Chapter 8 .
Object Models and the Excel Object Model
Each VBA host application (Word, Access, Excel, PowerPoint, Visual Basic)
supplements the basic VBA language by providing an object model to deal with the
objects that are particular to that application.
For instance, Excel VBA includes the Excel object model , which deals with such objects
as workbooks, worksheets, cells, rows, columns, ranges, charts, pivot tables, and so on.
On the other hand, the Word object model deals with such objects as documents,
templates, paragraphs, fonts, headers, tables, and so on. Access VBA includes two object
models, the Access object model and the DAO object model , that allow the programmer to
deal with such objects as database tables, queries, forms, and reports. (To learn more
about the Word, Access, and DAO object models, see my books Learning Word
Programming and Access Database Design and Programming , also published by
O'Reilly.)
Thus, an Excel programmer must be familiar with the general notion of an object model
and with the Excel object model in particular. We discuss object models in general in
Chapter 9 , and our discussion of the Excel object model takes up most of the remainder of
the topic.
Incidentally, the Excel object model is quite extensive—a close second to the Word object model
in size and complexity, with almost 200 different objects.
Lest you be too discouraged by the size of the Excel object model, I should point out that you only
need to be familiar with a handful of objects to program meaningfully in Excel VBA. In fact, as
we will see, the vast majority of the "action" is related to just seven objects: Application, Range,
WorksheetFunction, Workbook, Worksheet, PivotTable, and Chart.
 
Search JabSto ::




Custom Search