Share via


Visual Basic Concepts

Organizing Objects: The Object Model

An object model defines a hierarchy of objects that gives structure to an object-based program. By defining the relationships between objects that are part of the program, an object model organizes the objects in a way that makes programming easier.

The public object model of a component is especially important because it’s used by all the programmers who employ the component as part of their applications.

Note   Users of C++ or other object-oriented programming languages are used to seeing class hierarchies. A class hierarchy describes inheritance. That is, it shows how objects are derived from simpler objects, inheriting their behavior. By contrast, object models are hierarchies that describe containment. That is, they show how complex objects like Worksheets contain collections of other objects, such as Button, Picture, and PivotTable® objects. Object models can be created with Visual Basic, Visual C++, and other tools that support COM and ActiveX.

"Programming with Objects," in the Visual Basic Programmer’s Guide, includes an introduction to object models and a discussion of design considerations for collection classes. The following topics on object models for components assume familiarity with that material.

For More Information   Further information on object models can be found in "ActiveX Component Standards and Guidelines."