WindowActivate Event
This documentation is archived and is not being maintained.

Workbook.WindowActivate Event

Office 2007
Occurs when any workbook window is activated.

Syntax

expression.WindowActivate(Wn)

expression   A variable that represents a Workbook object.

Parameters

NameRequired/OptionalData TypeDescription
WnRequiredWindow The activated window.

Example

This example maximizes any workbook window when it's activated.

Visual Basic for Applications
Private Sub Workbook_WindowActivate(ByVal Wn As Excel.Window)
    Wn.WindowState = xlMaximized
End Sub



Show:
© 2016 Microsoft