Range.Resize Property
Excel Developer Reference |
Resizes the specified range. Returns a Range object that represents the resized range.
Syntax
expression.Resize(RowSize, ColumnSize)
expression An expression that returns a Range object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
RowSize | Optional | Variant | The number of rows in the new range. If this argument is omitted, the number of rows in the range remains the same. |
ColumnSize | Optional | Variant | The number of columns in the new range. If this argument is omitted, the number of columns in the range remains the same. |
Return Value
Range
Example
This example resizes the selection on Sheet1 to extend it by one row and one column.
Visual Basic for Applications |
---|
|
This example assumes that you have a table on Sheet1 that has a header row. The example selects the table, without selecting the header row. The active cell must be somewhere in the table before you run the example.
Visual Basic for Applications |
---|
|
See Also