Tom,
Hate being the ***** here, but this line:
Code:
Set myRange = Range(Range1.Address & "," & Range2.Address)
isn't actually doing what you'd expect. Range1 is in Sheet1, ok, and Range2 is in Sheet2, so far so good.
BUT, when you say
?Range1.Address & "," & Range2.Address
you're creating a string that's NOT "sheet dependant" sort of speak...
Let's use an example
Code:
?Range1.Address
$A$1:$C$10
?Range2.Address
$A$1:$F$50
again, Range1 is in a different sheet than Range2, but this
Code:
?Range1.Address & "," & Range2.Address
returns
Now, when you finally say
Set myRange = Range(stringabove)
it doesn't "know" that the first part was in Sheet1 and the second part was in Sheet2. It just assumes the ActiveSheet, because the range is not fully qualified.
You *could* get around that by using
Range1.Address(External:=True)
BUT THEN, an error arises when you try to define myRange.
I don't even think its possible to do that in Excel. If you define a name like
Rng
=Sheet1!A1:A10, Sheet2!A2:B15
Excel won't complain, but if you try to use it in a formula
=AREAS(Rng)
or just
=Rng
it will return a #VALUE! error.
So, I don't think its possible at all... I mean, I don't think its possible for ONE range object to hold different "subranges" from different sheets.