Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default getting the named cell

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default getting the named cell

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

"greg" wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default getting the named cell

thanks. it works.
name.name is kinda strange

"Peter T" <peter_t@discussions wrote in message
...
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

"greg" wrote in message
...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
Change Named Cell ranges based upon value of another cell? fedude Excel Programming 4 May 17th 06 02:19 PM
If any cell in named range = 8 then shade named range JJ[_8_] Excel Programming 3 August 26th 05 11:09 PM
formula for named cell/range based on cell values alex Excel Programming 2 August 25th 05 02:50 PM
can't move a named cell without breaking a hyperlink to that cell Snakeye Links and Linking in Excel 3 January 26th 05 11:57 PM


All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"