LineUp, LineUp()

Syntax

LineUp [Count] [Select]

LineUp([Count] [Select])

Remarks

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

Argument

Explanation

Count

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

Select

Specifies whether to select text:

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

Nonzero Text is selected. If there is already a selection, LineUp moves the active end of the selection toward the beginning 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, LineUp shrinks the selection. In a selection made from right to left, it extends the selection.


The LineUp() 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 up.

–1

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


Examples

This example moves the insertion point up 20 lines:


LineUp 20

The following example displays a message box if the insertion point is in the first line of the document:


If LineUp() = 0 Then MsgBox "No lines above here."

See Also

LineDown, ParaDown, ParaUp