Читать книгу Excel VBA Programming For Dummies - Dick Kusleika - Страница 79
Triggering actions with object events
ОглавлениеThis section briefly touches on one more topic that you need to know about: events. Events are specific things that you do inside Excel that Excel is constantly listening for (such as switching sheets or changing cells). For example, when you type a value into a cell, a Worksheet Change event occurs. You could, for example, have a VBA macro that is designed to execute whenever someone changes the value of a particular cell.
A lot of objects have events, but not all objects do. Some objects have a ton of events to listen for, while others have just a few. The only events you can use are those made available by the programmers of Microsoft Excel. Events are a very cool feature of the Excel object model, and I dig into them in Chapter 11 and also in Part 4.