• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Chapter 11. Excel Events

During the course of using Excel, certain events happen. For instance, when a worksheet is created, that is an event. When a chart is resized, that is an event. Microsoft Excel defines a total of 63 different events. When an event occurs, programmers like to say that the event fires.

The purpose of an event is simply to allow the VBA programmer to write code that will execute whenever an event fires. As we will see, this code is placed in an event procedure . The code itself is referred to as event code . We wrote some simple event code for the Open and BeforeClose workbook events when we created the SRXUtils add-in in the previous chapter.

Most Excel events break naturally into five groups, as indicated in Table 11-1 through Table 11-5. These groups partially reflect the level at which the event takes place—the application level (highest), the workbook level (middle), or the worksheet/chartsheet level (lowest).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint