Deactivate Event Example
This example arranges all open windows when the workbook is deactivated.
Private Sub Workbook_Deactivate() Application.Windows.Arrange xlArrangeStyleTiled End Sub