Window.Close Method

Project Developer Reference

Closes a pane or window.



expression   A variable that represents a Window object.

The following example closes the lower pane of every open window.

Visual Basic for Applications
  Sub CloseWindowsOfActiveProject()
Dim W As Window

For Each W in Application.Windows
    If Not (W.BottomPane Is Nothing) Then
    W.BottomPane.<strong class="bterm">Close</strong>
    End If
Next W

End Sub

See Also