Events
in general we can say event is anything that happen, An Event is an action that is initiated either by user action or by other VBA code. An Event Procedure is a Sub procedure that we write, according to the specification of the event, that is called automatically by Excel when an event occurs. For example, a Worksheet object has an event activate, whenever we active a worksheet in which this event is written , that event execute automatically.Workbook level events
Workbook events occur due to the user’s actions on the workbook itself. Examples of such events include creating a new worksheet, opening a workbook, and printing the workbook. To check all the workbook events we need to click on the workbook
then we need to click on general drop down box and need to select the workbook
this will allow us to check all the events related to the workbook in the declaration drop down box
Worksheet level events
Worksheet events are events that are triggered when a user performs an action on a worksheet. Examples of worksheet level events include double-clicking on a cell, right-clicking on a cell, changing a cell in the worksheet, changing the color of a worksheet, etc.To check all the worksheet events we need to click on the worksheet
this will allow us to check all the events related to the current worksheet in the declaration drop down box


0 Comments