CHAPTER 7Event programming

In this chapter, you will:

  • Learn what events are and how to use them

  • Review the different types of workbook, worksheet, chart, and application-level events

  • Use a sheet event to quickly enter military time into a cell

In this book, you’ve read about workbook events, and you’ve seen examples of worksheet events. An event allows you to automatically trigger a procedure to run based on something a user or another procedure does in Excel. For example, if a person changes the contents of a cell, after he or she presses Enter or Tab, you can have code run automatically. The event that triggers the code is the changing of the contents of the cell.

Levels of events

You can find events at the following levels:

  • Application ...

Get Microsoft Excel 2019 VBA and Macros, First Edition 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.