Range

Range returns a range object containing one or more cells. Returns a WksRange object.

Syntax

object.Range( Row, Col, LastRow, LastCol )

Parameter

Type

Required/

Optional

Default

Description

Row

Variant

Required

This provides the row number.

Col

Variant

Optional

This provides the column number or the column letter in quotes.

LastRow

Variant

Optional

This provides the last row number of the range.

LastCol

Variant

Optional

This provides the last column number of the range or the column letter in quotes.

Remarks

See Specifying Cell Coordinates for more information on selecting cells.

Example

This example demonstrates how to assign a range of cells to the variable named WksRange.

Dim WksRange As Object

Set WksRange = Wks.

Used by: WksDocument object