title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Workbook.WindowActivate event (Excel) |
vbaxl10.chm503083 |
|
|
e99d955c-1975-44c3-05b3-3aa6e851083c |
05/29/2019 |
medium |
Occurs when any workbook window is activated.
expression.WindowActivate (Wn)
expression A variable that represents a Workbook object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Wn | Required | Window | The activated window. |
This example maximizes any workbook window when it's activated.
Private Sub Workbook_WindowActivate(ByVal Wn As Excel.Window)
Wn.WindowState = xlMaximized
End Sub
[!includeSupport and feedback]