WorkbookDeactivate Event

Applies To

Application object.

Description

Occurs when any open workbook is deactivated.

Syntax

Private Sub object_WorkbookDeactivate(ByVal Wb As Workbook)

object An object of type Application declared with events in a class module.

Wb The workbook.

See Also

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

Example

This example arranges all open windows when a workbook is deactivated.

Private Sub App_WorkbookDeactivate(ByVal Wb As Workbook)
    Application.Windows.Arrange xlArrangeStyleTiled
End Sub