I have a Sub with a number of ranges called rng1, rng2, rng3,
etc.
I want to loop through all the ranges. I was hoping one of these methods of identifying the ranges would work, but they give me "Method 'Range' of object '_Global' failed":
Dim str as String
Dim I as Integer
Dim rng1 as Range, rng2 as Range, rng3 as Range
Set rng1 = Range("A10:A75")
Set rng2 = Range("A95:A175")
Set rng3 = Range("A180:A185")
For I = 1 to 3
Range("rng1").Copy 'I didn't expect that to work
Range("rng" & I).copy
Range("rng" & CStr(I)).Copy
str = "rng" & I
Range(str).Copy
Next I
EDITED to clarify as per the comments. I know the code sample doesn't do anything useful, but it shows what I have tried.