Re: What is default property of name object



Hi Peter,
Thank you very mcuh!
What I really mean is that there is an inconsistency here since we use
Range("A1:a3").Name = "data"( Set method) to assign a name, we can not
retrieve(Get) by referring to Range("A1:a3").Name

Clara
--
thank you so much for your help


"Peter T" wrote:

Hi Clara,

The default property of a Name is RefersTo, hence if the name refers to a
range returning the default property will return its address

Maybe you want this -

On error resume next
s = ""
s = Range("A1:a3").Name.Name
on error goto 0
If len(s) then
msgbox s & vbcr & Range("A1:a3").Name
else
msgbox "the range is not defined"
End if

Regards,
Peter T

"clara" <clara@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:68DAC615-D4AF-4FEB-8CEF-AEA4D0287F91@xxxxxxxxxxxxxxxx
Hi all,
I can use
Range("A1:a3").Name = "data"
to define a name object.

but Range("A1:a3").Name will display the address of the name object

Could you explain why?

Clara


--
thank you so much for your help



.



Relevant Pages

  • Re: BC 9-26-06
    ... James Nicoll wrote: ... Peter B. Steiger wrote: ... I bet that's what he was referring to. ...
    (rec.arts.comics.strips)
  • Re: BC 9-26-06
    ... Peter B. Steiger wrote: ... I bet that's what he was referring to. ... Weren't there rumours that there was going to be de-Xtianized ...
    (rec.arts.comics.strips)
  • Re: Calculating column J and offsetting result in column L on next blank row (continue to end of she
    ... Your code places subtotals 1 row below & 2 columns to right of each area. ... Peter T ... Set myRng = Nothing ... On Error GoTo 0 ...
    (microsoft.public.excel.programming)
  • Re: What is default property of name object
    ... Set rng = ... What I really mean is that there is an inconsistency here since we use ... "Peter T" wrote: ... The default property of a Name is RefersTo, ...
    (microsoft.public.excel.programming)
  • Re: What is default property of name object
    ... Set rng = ... What I really mean is that there is an inconsistency here since we use ... "Peter T" wrote: ... but Range.Name will display the address of the name object ...
    (microsoft.public.excel.programming)