This topic has not yet been rated - Rate this topic

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



Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ