View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default How hold multiple versions of the same range?

Uh!
set Myrange = Range(Cells(1,1),cells(70,70))

You decaration actually put data into the array MyRange, my method just sets
a point to the range.


Dim MyRange(6) as range
set Myrange(0) = Range(Cells(1,1),cells(70,70))
set Myrange(1) = Range(Cells(71,1),cells(140,70))
set Myrange(2) = Range(Cells(141,1),cells(210,70))
set Myrange(3) = Range(Cells(211,1),cells(280,70))
set Myrange(4) = Range(Cells(281,1),cells(350,70))
set Myrange(5) = Range(Cells(351,1),cells(420,70))

Myrange(5).copy destination:=sheets("Sheet2").Range("A1")



"John" wrote:

I want to save multiple possibilities for a range and be able to pop one
back into the range. Is there a way to do this other than saving the
ranges to an array? Can't use copy, paste because there are more than one.

Have Myrange = (Cells(1,1),cells(70,70))

then have 6 different versions of myrange.

thanks
John