4. Working with Excel Events

Events in the Excel Object Model

Understanding the events in the Excel object model is critical because this is often the primary way that your code is run. This chapter examines all the events in the Excel object model, when they are raised, and the type of code you might associate with these events.

Many of the events in the Excel object model are repeated on the Application, Workbook, and Worksheet objects. This repetition allows you to decide whether you want to handle the event for all workbooks, for a particular workbook, or for a particular worksheet. If you want to know when any worksheet in any open workbook is double-clicked, for example, you would handle the Application object’s SheetBeforeDoubleClick ...

Get Visual Studio Tools for Office: Using Visual Basic 2005 with Excel, Word, Outlook, and InfoPath 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.