Resize
The Resize property in Excel VBA makes a range (border below for illustration only) a specific number of rows and columns larger or smaller. The Resize property always takes the top left cell of a range as the starting point.
Code line:
Range(“A1:C4”).Resize(3, 2).Select
Result:
Explanation: this code line resizes Range(“A1:C4”) to 3 rows and 2 columns and selects this range.
Code line:
Range(“A1:C4”).Resize(, 1).Select
Result:
Explanation: this code line resizes Range(“A1:C4”) to 1 column (we omit any row specification) and selects this range.
Next Chapter: