Skip to content

Latest commit

 

History

History
49 lines (30 loc) · 977 Bytes

Excel.Workbook.NewSheet.md

File metadata and controls

49 lines (30 loc) · 977 Bytes
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Workbook.NewSheet event (Excel)
vbaxl10.chm503079
vbaxl10.chm503079
Excel.Workbook.NewSheet
5abb254d-a2c3-7dac-e79f-0de74a081ecd
05/29/2019
medium

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

[!includeSupport and feedback]