getting the named cell

G

greg

If I want to get the named cell,
For instance D5 is mycell1
If I have
Dim objRange As Excel.Range
Set objRange = Range("D5")

Can I get the name of the cell?

If I do this:
objRange.ListNames
it puts the name of the cell in the text area. Quite strange.
But, any way to get the named cell?
thanks
 
P

Peter T

sNm = objRange.Name.Name

You'll probably want to do that under an error handler in case the range is
not named.

Regards,
Peter T
 
G

greg

thanks. it works.
name.name is kinda strange

Peter T said:
sNm = objRange.Name.Name

You'll probably want to do that under an error handler in case the range
is
not named.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top