Microsoft Office 2000/Visual Basic Programmer's Guide |
As a VBA programmer, you understand how to handle form and control events. If you've programmed in Word or Excel, you may also have taken advantage of events on the ThisDocument, ThisWorkbook, or SheetN objects. These event procedures are simple to create — you just open the class module and construct the event procedure from the Object and Procedure drop-down lists in the Code window.
There are two additional ways to handle events from VBA code in an Office application. You can create event procedures for certain objects that provide built-in events but that don't have associated class modules. You can also create custom events for your own classes.