EndOfColumn, EndofColumn()

Syntax

EndOfColumn [Select]

EndOfColumn ([Select])

Remarks

The EndOfColumn statement moves the insertion point or extends the selection (if Select is nonzero) to the bottom of the table column containing the insertion point or selection. If the selection extends over more than one column, the insertion point moves or the selection is extended to the bottom of the rightmost column in the selection. If the insertion point or selection is not in a table, an error occurs.

Note

If the last row in the table does not have a cell that corresponds to the column that contains the current selection — for example, if you have deleted or merged cells in the last row — EndOfColumn moves the insertion point or extends the selection to the end of the last row in the table.

The EndOfColumn() function behaves the same as the statement and also returns one of the following values.

Value

Explanation

0 (zero)

If the insertion point was not moved or the selection was not extended (that is, if it was already at the bottom of the column)

–1

If the insertion point was moved or the selection was extended


Example

This example moves the insertion point from anywhere in the table to the beginning of the last cell in the last row:


EndOfRow
EndOfColumn

See Also

EndOfRow, StartOfColumn