API Documentation > CorelDRAW > 2025-v26 > Window > IVGWindow
Window.Close method
Closes the window
Syntax:
Sub Close()
Remarks:
The Close method closes a window. When you close an active file, you are pompted to save it.
Examples:
The following VBA example closes the first window in the Windows collection if it contains more than one window.
Sub Test()
Dim Wnd As Window
If ActiveDocument.Windows.Count > 1 Then
  Set Wnd = ActiveDocument.Windows(1)
  Wnd.Close
End If 
End Sub