Working with the Active Window : Windows « Application « VBA / Excel / Access / Word






Working with the Active Window

 
'To make sure that a window is open, check whether the Count property of the Windows collection is 0
Sub open()
    If Windows.Count = 0 Then MsgBox "There is no active window.", vbOkOnly + _
        vbExclamation, "No Window Is Open"
End Sub

 








Related examples in the same category

1.How to arrange the windows: as icons (wdIcons, 1) or tiled (wdTiled, 0). The default is wdTiled.
2.Arranging and Resizing Windows: ppWindowMaximized, ppWindowMinimized, or ppWindowNormal.
3.Closing a Window
4.transform all windows into icons
5.Split windows