ActiveCodePane Property
Applies To
VBE object.
Description
Returns the active or last active CodePane object or sets the active CodePane object. Read/write.
Remarks
You can set the ActiveCodePane property to any valid CodePane object, as shown in the following example:
Set MyApp.VBE.ActiveCodePane = MyApp.VBE.CodePanes(1)
The preceding example sets the first code pane in a collection of code panes to be the active code pane. You can also activate a code pane using the Set method.
See Also
ActiveWindow property, CodePane object, CodePanes collection, CodePaneView property.
Example
The following example uses the ActiveCodePane property and TopLine properties to obtain the number of the top line in the active code pane.
Debug.Print Application.VBE.ActiveCodePane.TopLine