Thread: ranges
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default ranges

Describe the "on the fly" part of your message; that is, how is the A4 and
G7 cell limits being obtained? I ask because I would think you could just
use something like this...

Start = "A4" {by whatever means you use to obtain it}
Finish = "G7" {by whatever means you use to obtain it}
Set rSubRange = Range(Start & ":" & Finish)

--
Rick (MVP - Excel)


"greg" wrote in message
...
Hello,
Suppose I have a table in excel. A1 to 12 G. It is defined as MyTable.

now I want to programatically grab or define a sub range.
Say A4 to G7.

How can this be done?
If I have
Dim rRange as Range
Dim rRange2 as Range
set rRange = Range("MyTable")

How can I get the second range, from the first, on the fly?

thanks