Retrieving range string from named range
If myrange is truly a range found in the listing in Insert=Names=Define
then
Dim rng as Range
set rng = Sheets(1).Range("MyRange")
Sheets(i).Range(rng.Address).Value = rng.Value
or
With Sheets(1).Range("MyRange")
Sheets(i).Range(.Address).Value = .Value
End With
--
Regards,
Tom Ogilvy
"clapper" wrote in message
...
I have an input box that defines a range, which is then named, i.e.
myRange.
Later in the program, I have need of the String version of the range that
the user entered.
To be specific, the following line of code DOES work:
Sheets(i).Range("k26:k48").Value = Sheets(1).Range("k26:k48").Value
However, the same line, using the SAME range, just in a named format, does
NOT work:
Sheets(i).Range("myRange").Value = Sheets(1).Range("myRange").Value
Does this make sense?
|