ActiveWindow Property
Applies To
VBE object.
Description
Returns the active window in the development environment. Read-only.
Remarks
When more than one window is open in the development environment, the ActiveWindow property setting is the window with the focus. If the main window has the focus, the ActiveWindow property returns Nothing.
See Also
ActiveCodePane property, MainWindow property, SetFocus method, Window object.
Example
The following example uses the ActiveWindow property to return the caption of the active window.
Debug.Print Application.VBE.ActiveWindow.Caption