WindowDeactivate Event

Applies To

Application object, Workbook object.

Description

Occurs when any workbook window is deactivated.

Syntax

Private Sub object_WindowDeactivate(ByVal Wb As Excel.Workbook, ByVal Wn As
úExcel.Window)

object Application or Workbook.

Wb Used only with the Application object. The workbook displayed in the deactivated window.

Wn The deactivated window.

See Also

Activate event, Deactivate event, SheetActivate event, SheetDeactivate event, WindowActivate event, WorkbookActivate event, WorkbookDeactivate event.

Example

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

Private Sub Workbook_WindowDeactivate(ByVal Wn As Excel.Window)
    Wn.WindowState = xlMinimized
End Sub