If you work with Excel VBA, you must work with different types of events. Event is like a situation. For example:
- You change the value of a cell in a worksheet; it is an event.
- Or you open a new worksheet in a workbook; it is also an event.
- You close a workbook; it is an event.
- You delete a worksheet from a workbook; it is an event.
- So there might be so many events when you work with Excel.
It is not necessary that when an event occurs, something will happen automatically. You have to control/handle the events. For example:
Event Part | Handling Part |
You change the value of a cell in a worksheet | Another cell will change its background color depending on the value of the first cell. |
You open a new worksheet in a workbook | In the new worksheet’s some cells will be filled with some predetermined values. |
You close a workbook | It will show some message to the user of the workbook. |
You delete a worksheet from a workbook | It will show some message to the user of the workbook. |
In this post, I have linked back to my old 5 tutorials that will teach you Excel VBA Events completely and in step by step procedure:
- What are Excel Events and Their Types.
- How to Enter Event Handler VBA Code.
- Workbook-level Events and Their Uses.
- Worksheet-related Events and Their Uses.
- How to Use Non-object Events.
If you follow the above tutorials step by step, you will be able to make any complicated project using Excel VBA Events. Just you have to do a little practice.
Happy Excelling 🙂