This documentation is archived and is not being maintained.

Application.WindowDeactivate Event

Office 2007
Occurs when any workbook window is deactivated.

Syntax

expression.WindowDeactivate(Wb, Wn)

expression   A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
WbRequiredWorkbookThe workbook displayed in the deactivated window.
WnRequiredWindowThe deactivated window.

Example

This example minimizes any workbook window when it's deactivated.

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



Show: