February 2022
Beginner to intermediate
432 pages
9h 21m
English
Chapter 11
IN THIS CHAPTER
Knowing the event types that can trigger an execution
Finding out where to place your event-handler VBA code
Executing a macro when a workbook is opened or closed
Executing a macro when a workbook or worksheet is activated
You have a number of ways to execute a VBA Sub procedure. One way is to arrange for the Sub to be executed automatically. In this chapter, you explore the ins and outs of this potentially useful feature, learning how to set things up so that a macro is executed automatically when a particular event occurs.
An event is basically something that happens in Excel. Following are a few examples of the types of events that Excel can recognize:
Dozens of different types of events ...