title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Application.WorkbookNewSheet event (Excel) |
vbaxl10.chm504087 |
|
|
5190254f-b7f4-10e5-41f5-704b1466ff68 |
04/05/2019 |
medium |
Occurs when a new sheet is created in any open workbook.
expression.WorkbookNewSheet (Wb, Sh)
expression A variable that represents an Application object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Wb | Required | Workbook | The workbook. |
Sh | Required | Object | The new sheet. |
Nothing
This example moves the new sheet to the end of the workbook.
Private Sub App_WorkbookNewSheet(ByVal Wb As Workbook, _
ByVal Sh As Object)
Sh.Move After:=Wb.Sheets(Wb.Sheets.Count)
End Sub
[!includeSupport and feedback]