Worksheet.Deactivate Event (Excel)

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

expression .Deactivate

expression A variable that represents a Worksheet object.

Return Value

nothing

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

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