NewSheet Event

Applies To

Workbook object.

Description

Occurs when a new sheet is created in the workbook.

Syntax

Private Sub Workbook_NewSheet(ByVal Sh As Object)

Sh The new sheet. Can be a Worksheet or Chart object.

See Also

WorkbookNewSheet event.

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