title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Application.WorkbookActivate event (Excel) |
vbaxl10.chm504082 |
|
|
a2b6ea2e-3753-69bf-9a81-ec2fce29d4fd |
04/05/2019 |
medium |
Occurs when any workbook is activated.
expression.WorkbookActivate (Wb)
expression A variable that represents an Application object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
Wb | Required | Workbook | The activated workbook. |
Nothing
For information about how to use event procedures with the Application object, see Using events with the Application object.
This example arranges open windows when a workbook is activated.
Private Sub App_WorkbookActivate(ByVal Wb As Workbook)
Application.Windows.Arrange xlArrangeStyleTiled
End Sub
[!includeSupport and feedback]