Events in Excel
Events are happening all the time when a user opens an Excel
workbook and starts doing various actions such as entering data into
cells or moving between sheets
VBA is an abbreviation for Visual Basic
for Application. VBA is a programming
language that was developed by
Microsoft Corp., and it is integrated into
the major Microsoft Office applications,
such as Word, Excel, and Access.
VBA allows you to automate various
activities in Excel such as generating
reports, preparing charts & graphs, doing
calculations, etc. This automation activity
is also known as Macro
Accessing VBA Editor
In Excel window, press "ALT+F11". A
VBA window opens up as shown in
the following screenshot.
Workbook events are defined as an action performed by
a user in Microsoft Excel that can trigger the execution
of a specified macro. For example, when a user opens
a workbook in Excel, the event “Workbook_Open” is
triggered. Similarly, when the user saves the current
workbook, the event “Workbook_BeforeSave” is
initiated. There are many such events that are built
into Excel VBA.
A workbook event is defined as an action that triggers
the execution of a specific macro in Excel.
VBA automatically executes an event once a user
specifies the code for an event that has already
An example of a VBA worksheet event is Open, which is
triggered as soon as a Workbook is activated.