WindowDeactivate Event Example
This example minimizes any workbook window when it's deactivated.
Private Sub Workbook_WindowDeactivate(ByVal Wn As Excel.Window) Wn.WindowState = xlMinimized End Sub