Closing a Window : Windows « Application « VBA / Excel / Access / Word






Closing a Window

 
Sub close()
    Do While ActiveWorkbook.Windows.Count > 1
        ActiveWorkbook.Windows(myWorkbook.Windows.Count).Close
    Loop
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.Working with the Active Window
3.Arranging and Resizing Windows: ppWindowMaximized, ppWindowMinimized, or ppWindowNormal.
4.transform all windows into icons
5.Split windows