LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Question about a range

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



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Range question greg Excel Programming 4 July 11th 09 12:56 PM
Range question Barb Reinhardt Excel Programming 14 July 11th 06 04:12 PM
Range Question / error 1004: method Range of object Worksheet has failed Paul Excel Programming 3 April 7th 05 02:56 PM
range: question Simon Sunke Excel Programming 2 February 23rd 04 03:25 PM
Range.Formula and Range question using Excel Automation [email protected] Excel Programming 0 September 19th 03 04:53 AM


All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"