Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Could anyone point out how to get a cell's name in the VBA code. I am trying to retrieve a cell's name - for example suppose target is the range object pointing to a single cell. Following lines get the cell address instead of cell name. target.Name or target.Cells(1, 1).Name How do I get the cell's name instead of address? Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Pallavi
You have to use the name property twice: Target.Name.Name -- Best Regards Leo Heuser Followup to newsgroup only please. "Pallavi Singh" skrev i en meddelelse ... Hello, Could anyone point out how to get a cell's name in the VBA code. I am trying to retrieve a cell's name - for example suppose target is the range object pointing to a single cell. Following lines get the cell address instead of cell name. target.Name or target.Cells(1, 1).Name How do I get the cell's name instead of address? Thanks in advance |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Leo, Thanx for your quick response. The problem is that 'Name' is being exposed as a property. Hence when I do a 'targetRange.Name.Name' I get a runtime error 'Object doesn't support this property or method', error 438. Do I need to set some sort of property to True to make this work? Thanx *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're welcome, Pallavi.
Please post the full code + which version of Excel you are using to the group. I have to leave at 9.00, so if your posting is later than that, I won't be able to answer until this afternoon. (right now it's 7.30 in the morning in Denmark) -- Best Regards Leo Heuser Followup to newsgroup only please. "Pallavi Singh" skrev i en meddelelse ... Leo, Thanx for your quick response. The problem is that 'Name' is being exposed as a property. Hence when I do a 'targetRange.Name.Name' I get a runtime error 'Object doesn't support this property or method', error 438. Do I need to set some sort of property to True to make this work? Thanx *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Leo,
Actually using targetRange.Name.Name did solve the problem. I don't know why it din't work 1st time. But its working right now. Thanks for your help :) *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Glad it worked for you, Pallavi :-)
Thanks for the feedback. -- Best Regards Leo Heuser Followup to newsgroup only please. "Pallavi Singh" skrev i en meddelelse ... Hi Leo, Actually using targetRange.Name.Name did solve the problem. I don't know why it din't work 1st time. But its working right now. Thanks for your help :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using 1 cell's value as a reference | Excel Discussion (Misc queries) | |||
row= cell's row | Excel Worksheet Functions | |||
How to change an other cell's value? | Excel Discussion (Misc queries) | |||
returning a cell's value and a corresponding value | Excel Worksheet Functions | |||
How do I get a cell's row number | Excel Programming |