An procedure that is executed automatically by Excel when the event is raised.
It is important to remember that in addition to user input, events may run as the results of actions taken by other VBA code.
OBJECT MODULES -- Everything related to event handling -- the definition of event procedures, creating a Learning What Events Are Available For An Object You can use the Object Browser in the VBA Editor to determine what events are avaiable for the three objects that generate events -- the Worksheet, the Workbook, and the Application.
The declaration will tell you what the parameters for the event are, but you will still need to use Help to obtain a description of the meaning and usage of the parameters.
Event procedures must be declared exactly as they are defined.
Introduction Event programming is a very powerful tool that you can use within your VBA code to monitor user actions, take appropriate action when a user does something, or monitor the state of the application as it changes.
If you are programming with your own custom classes, you can extend the functionality of these classes by defining and raising your own custom events, broadcasting the event message to any object that is listening for events from your class.
This event is raised automatically by Excel when a cell's value is changed either by user input or by other VBA code.
It is not raised if the value of the cell is changed by a formula calculation in that cell.For information about supressing events for controls on a form, see Suppressing Events In User Forms.Events on Charts are a special case of events and need special code handling.On this page, we will cover Application events in only in general terms, but not in much detail since they require a different coding model.(See Application Events for a discussion of Application events.) An event is said to be when the action that initiates the event occurs and the application automatically sends a signal to all components connected to event-generating object (e.g, a Worksheet) indicating that the event has occured.A few new events have been added, but the overall structure of the event system is unchanged.