Deactivate Event [Excel 2003 VBA Language Reference]

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

Private Subobject**_Deactivate()**

objectChart, Workbook, or Worksheet. For information about using events with the Chart object, see Using Events with Embedded Charts.


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

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

Applies to | Chart Object | Workbook Object | Worksheet Object

See Also | Activate Method | BeforeClose Event | LostFocus Event | SheetActivate Event | SheetDeactivate Event | WindowActivate Event | WindowDeactivate Event | WorkbookActivate Event | WorkbookDeactivate Event