Skip to content

Latest commit

 

History

History
54 lines (32 loc) · 1.19 KB

Excel.Application.WorkbookActivate.md

File metadata and controls

54 lines (32 loc) · 1.19 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.WorkbookActivate event (Excel)
vbaxl10.chm504082
vbaxl10.chm504082
Excel.Application.WorkbookActivate
a2b6ea2e-3753-69bf-9a81-ec2fce29d4fd
04/05/2019
medium

Application.WorkbookActivate event (Excel)

Occurs when any workbook is activated.

Syntax

expression.WorkbookActivate (Wb)

expression A variable that represents an Application object.

Parameters

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

Return value

Nothing

Remarks

For information about how to use event procedures with the Application object, see Using events with the Application object.

Example

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]