Application.NewWorkbook event (Excel)

Occurs when a new workbook is created.


expression.NewWorkbook (Wb)

expression An expression that returns an Application object.


Name Required/Optional Data type Description
Wb Required Workbook The new workbook.


This example arranges open windows when a new workbook is created.

Private Sub App_NewWorkbook(ByVal Wb As Workbook) 
 Application.Windows.Arrange xlArrangeStyleTiled 
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.