Mapping the Visual Basic for Applications Object Library: VBA 2.2

Ken Lassesen
Microsoft Developer Network Technology Group

October 26, 1995

Click here for a diagram of the Visual Basic for Applications Object Library in various graphics formats.

Abstract

This article consists primarily of a graphic map of the Visual Basic for Applications Object Library, version 2.2 (VBA), showing its objects and their related properties and methods. This object ships with Visual Basic® version 4.0 and Microsoft Access version 7.0. Earlier versions ship with Microsoft Excel version 7.0 and Microsoft Project version 7.0.

Visual Basic for Applications Object

The Visual Basic for Applications object library contains many functions and three objects. The functions are mapped by Greg Buckwalter in his article "Mapping Functions, Statements, and Methods of Microsoft Visual Basic for Applications: VBA;" the objects in this library are mapped in this article. The two maps complement each other.

The Visual Basic for Applications object is accessible from Microsoft Excel version 5.0 and higher, Microsoft Access 95, Visual Basic® version 4.0, and Microsoft Project 4.0 or higher. For further information on using this object, see the documentation for any of the above products and search the Development Library CD.

Figure 1 shows the relationship between objects as described by the Object Viewer and online Help files. A map is a good learning aid and a quick reference when developing an application. After producing a map, I found that it was easy to work with the object: I just post the appropriate map on my wall for quick reference, which is a lot faster than clicking objects in a Help file one by one to discover their properties and methods.

Because Figure 1 is difficult to read online, I have included the two most common graphics formats—encapsulated PostScript (.EPS) and Windows® metafile (.WMF)—as well as a copy of my original Shapeware® Visio version 4.0 file (.VSD). The first two formats can be printed across multiple pages using any of the commercial graphics applications—such as Adobe PageMaker, Corel® Draw, or Microsoft® Publisher—or using Microsoft Excel. The original Visio file is included for those who have a copy of Visio and wish to modify the diagram easily.

Figure 1. The Visual Basic for Applications object

Object Definitions

The objects and collections in Figure 1 are defined in Table 1. The objects are listed in the same sequence as they appear in the map. These objects are not available in versions earlier than 2.2 of Visual Basic for Applications.

Table 1. Object and Collection Definitions

 Object or Collection Definition
Collection object This object is an ordered set of items that can be referred to as a unit. The Count method is identified as a property in the Help file but was implemented as a method.
Err collection This object contains information about run-time errors. Accepts the Raise and Clear methods for generating and clearing run-time errors.
Debug object This object sends output to the Debug window at run time.

Bibliography

Buckwalter, Greg. "Mapping Functions, Statements, and Methods of Microsoft Visual Basic for Applications: VBA." (MSDN Library, Techical Articles)

"Visual Basic Reference" (VBAEN2.HLP) is installed with Visual Basic 4.0 and Microsoft Access 7.0.