New Sheet Event

This event takes place when a new sheet is created.

Syntax: expression.SheetActivate(sh)

sh: New sheet as an object

The following code is to move the new sheet to the end of the workbook.

 


Excel VBA Events

An action performed by VBA code is called an event. Suppose, some events are executed automatically by Excel that’s because of the code written in VBA which is known as Event Handler. The execution of a specified macro can be triggered using an action which is known as an event. For example, if we want to change the color of a specific cell only by clicking on it or if we want to add a text-only by clicking on a button then we can use Events. There are two types of Events one is worksheet events and another one is workbook events which we will discuss in this article.

Similar Reads

Worksheet Events

Step 1: Right-click on the sheet tab at the bottom of the Excel screen and select View Code....

Activate Events

Syntax: expression.Activate Expression: Which represents the Worksheet object...

Deactivate Events

This event takes place when the worksheet is deactivated. The following example is shown to arrange the windows vertically when the worksheet is deactivated....

Change Event

This event is used to change the cell of the worksheet....

PivotTableUpdate Event

This event is used to update the pivot table in the worksheet....

Workbook Events

For workbook events we have to follow some following steps:...

After Save Event

This event will take place after the workbook is saved....

Sheet Activate Event

This event takes place when the sheet is activated....

Sheet Change Event

This event takes place when the sheet is changed....

New Sheet Event

This event takes place when a new sheet is created....