Skip to main content

Application.NewWorkbook event

Table of contents
  1. Syntax
  2. Parameters
  3. Example

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

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>