Rows [WksRange]

Rows returns a range containing all or some of the rows in the current range. Returns a WksRange object.

Syntax

object.Rows( Row1, Row2 )

Parameter

Type

Required/

Optional

Default

Description

Row1

Variant

Required

This provides first row number. The range may have a single row.

Row2

Variant

Optional

This provides the last row number of the range.

Remarks

See Specifying Cell Coordinates for more information on selecting cells.

Example

This example demonstrates how to assign rows of cells within an existing range to the variable named WksRange2.

Dim WksRange2 As Object

Set WksRange2 = WksRange.Rows(Row1:=3, Row2:=7)

Used by: WksRange object