Workbook.NewSheet event (Excel)

Occurs when a new sheet is created in the workbook.

Syntax

expression.NewSheet (Sh)

expression A variable that represents a Workbook object.

Parameters

Name Required/Optional Data type Description
Sh Required Object The new sheet. Can be a Worksheet or Chart object.

Return value

Nothing

Example

This example moves new sheets to the end of the workbook.

Private Sub Workbook_NewSheet(ByVal Sh as Object) 
 Sh.Move After:= Sheets(Sheets.Count) 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.