16.2. Creating And Using Classes

A class is the formal definition of an object — typically, a custom object. By defining classes, you can build your own custom objects. A class acts as a sort of template for an object: once you've created the class, you can create objects based on it. The relationship between class and object is sometimes described as similar to a cookie cutter and a cookie, or a blueprint and the houses based on that blueprint.

Another way to think of this relationship between class and object is the distinction between design time and runtime. You create a class during design time by writing code that describes the object (or multiple objects) that will come into being during runtime when the class code executes. The phrase ...

Get Mastering VBA for Microsoft Office 2007, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.