MainWindow Property Example

The following example uses the MainWindow property to return the Window object representing the main window, and then prints the caption of the main window.

Debug.Print Application.VBE.MainWindow.Caption