LineDown, LineDown()

Syntax

LineDown [Count] [Select]

LineDown([Count] [Select])

Remarks

The LineDown statement moves the insertion point or the active end of the selection (the end that moves when you press SHIFT+DOWN ARROW) down by the specified number of lines.

Argument

Explanation

Count

The number of lines to move down; if omitted, 1 is assumed. Negative values move the insertion point or the active end of the selection up.

Select

Specifies whether to select text:

0 (zero) or omitted Text is not selected. If there is already a selection, LineDown moves the insertion point Count lines below the selection.

Nonzero Text is selected. If there is already a selection, LineDown moves the active end of the selection toward the end of the document.

In a typical selection made from left to right, where the active end of the selection is closer to the end of the document, LineDown extends the selection. In a selection made from right to left, it shrinks the selection.


The LineDown() function behaves the same as the statement and also returns the following values.

Value

Explanation

0 (zero)

If the insertion point or the active end of the selection cannot be moved down.

–1

If the insertion point or the active end of the selection is moved down by any number of lines, even if less than Count. For example, LineDown(10) returns –1 even if the insertion point is only three lines above the end of the document.


Examples

This example moves the insertion point down five lines:


LineDown 5

The following example uses LineDown() to count the lines in a document:


StartOfDocument
lines = 1
While LineDown()
    lines = lines + 1
Wend
MsgBox "There are" + Str$(lines) + " lines in the document."

See Also

LineUp, ParaDown, ParaUp