Chapter Eighteen. Creating Custom Classes and Objects

You have seen throughout th book how Office development makes heavy use of classes and objects. While the objects exposed by the various Office applications are indeed powerful and flexible, they cannot, of course, cover every possible development need. Hence, VBA offers you the ability to create your own classes. With the full power of the VBA language at your disposal, your custom classes can do just about anything you need them to. The classes you can create in VBA fall into two categories. A class module is for classes that have properties and methods, but do not present a visual interface to the user. A user form is for classes that have a visual interface. I will explain how to use ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.