Range object evaluates to Range.value, or Range object
Thanks for that, Bernie.
On Jun 3, 2:07*pm, "Bernie Deitrick" <deitbe @ consumer dot org
wrote:
Paul,
You need to use Set:
Dim objRange As Range
Set objRange = Range("A1")
Msgbox objRange.Address & " is " & objRange.Value
HTH,
Bernie
MS Excel MVP
wrote in message
...
In most equations, when a Range object shows up in an expression on
the right hand side of the assignment operator "=", the range object's
value is used. *I'm interested in assigning a range object to a
variable that has been dim'd as type Range.
Where can one find the rules that govern what objects evaluate to when
they show up in expressions?
Also, in many cases, things like Range are used in the documentation
to describe a Range object as well as a collection of range objects.
Where in the documentation does it describe how the word Range is
interpretted in (say) a Dim statement? *What about rules governing
whether a collection is returned in evaluating an expression, or
whether a default object within the collection is returned?
Thanks. *(I'm using Office 2003)
|