Skip to main content

Workbook.Open event

Table of contents
  1. Syntax
  2. Examples

Occurs when the workbook is opened.

Syntax

expression.Open

expression An expression that returns a Workbook object.

Examples

This example maximizes Microsoft Excel whenever the workbook is opened.

'------------------ ThisWorkbook ------------------
Private Sub Workbook_Open()
    Application.WindowState = xlMaximized
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>