Deactivate Event

Applies To

Chart object, Workbook object, Worksheet object.

Description

Occurs when the chart, worksheet, or workbook is deactivated.

Syntax

Private Sub object_Deactivate( )

object Chart, Workbook, or Worksheet.

See Also

Activate event, BeforeClose event, LostFocus event, SheetActivate event, SheetDeactivate event, WindowActivate event, WindowDeactivate event, WorkbookActivate event, WorkbookDeactivate event.

Example

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

Private Sub Workbook_Deactivate()
    Application.Windows.Arrange xlArrangeStyleTiled
End Sub