API Documentation > CorelDRAW > 2025-v26 > Window > IVGWindow
Window.Activate method
Activates the window
Syntax:
Sub Activate()
Remarks:
The Activate method opens a window (if it is not currently open) and makes it the active window. Some operating systems do not allow the application to activate itself, to prevent intervention with the current activity. If the application cannot be activated, the application window flashes on the taskbar, but it does not appear in the foreground.
Examples:
The following VBA example sets the last window in the collection as the foreground window.
Sub Test()
Dim Wnd As Window
Set Wnd = ActiveDocument.Windows(ActiveDocument.Windows.Count)
Wnd.Activate 
End Sub