TopLine Property

Applies To

CodePane object.

Description

Returns a Long specifying the line number of the line at the top of the code pane or sets the line showing at the top of the code pane. Read/write.

Remarks

Use the TopLine property to return or set the line showing at the top of the code pane. For example, if you want line 25 to be the first line showing in a code pane, set the TopLine property to 25.

The TopLine property setting must be a positive number. If the TopLine property setting is greater than the actual number of lines in the code pane, the setting will be the last line in the code pane.

See Also

CountOfVisibleLines property, GetSelection method, SetSelection method.

Example

The following example uses the TopLine property to return the line number of the top line in the specified code pane.

Debug.Print Application.VBE.CodePanes(3).TopLine