Workbook.NewSheet Event (Excel)
Occurs when a new sheet is created in the workbook.
Syntax
식 .NewSheet(Sh)
식 A variable that represents a Workbook object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Sh |
필수 |
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