R
Robert Crandal
Suppose I want to select a specific range, such as:
Range("B10:Q10").Select
The above range exists on row #10, between
Column B and Column Q.
In my VBA program, the user is allowed to pick only
a row number, such as row 10. If I know the row
number, what are the possible ways to convert this
value into the above range?
The only thing that I can think of is the following code:
Range("B" & row_n & ":Q" & row_n).Select
In the above code, the variable "row_n" stores the
value of the row that a user can pick. I'm pretty sure
this will work. I just somehow think there are other
ways to achieve the same result, as opposed to
concatenating a bunch of strings to form a range string.
Are there other techniques here?
thanks
Range("B10:Q10").Select
The above range exists on row #10, between
Column B and Column Q.
In my VBA program, the user is allowed to pick only
a row number, such as row 10. If I know the row
number, what are the possible ways to convert this
value into the above range?
The only thing that I can think of is the following code:
Range("B" & row_n & ":Q" & row_n).Select
In the above code, the variable "row_n" stores the
value of the row that a user can pick. I'm pretty sure
this will work. I just somehow think there are other
ways to achieve the same result, as opposed to
concatenating a bunch of strings to form a range string.
Are there other techniques here?
thanks