#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Cell Names

Hi all:

In excel 2003 VBA, is there a way of knowing if a cell (or groups of cells)
have a name, and if so, what is that name? I know how to get all the
defined names, but not for a particular cell.

Thanks;

Bob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Cell Names


Dim myRng as range
dim myName as string
set myrng = worksheets("Sheet99").range("a1")

myname = ""
on error resume next
myname = myrng.name.name
on error goto 0

if myname = "" then
msgbox "no name"
else
msgbox myName
end if



Bob wrote:

Hi all:

In excel 2003 VBA, is there a way of knowing if a cell (or groups of cells)
have a name, and if so, what is that name? I know how to get all the
defined names, but not for a particular cell.

Thanks;

Bob


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Cell Names

Thanks Dave. I did not know you can use .Name.Name

Bob

"Dave Peterson" wrote in message
...
Dim myRng as range
dim myName as string
set myrng = worksheets("Sheet99").range("a1")

myname = ""
on error resume next
myname = myrng.name.name
on error goto 0

if myname = "" then
msgbox "no name"
else
msgbox myName
end if



Bob wrote:

Hi all:

In excel 2003 VBA, is there a way of knowing if a cell (or groups of
cells)
have a name, and if so, what is that name? I know how to get all the
defined names, but not for a particular cell.

Thanks;

Bob


--

Dave Peterson



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
Creating cell names from cell contents en masse John[_26_] Excel Worksheet Functions 1 May 15th 09 02:41 AM
Cell names = sheet names Vince Excel Worksheet Functions 9 February 8th 08 03:59 PM
How to create table of cell names with the name's cell address WildwoodEngr Excel Discussion (Misc queries) 1 October 26th 06 02:52 PM
Multi names in one cell copied to single cell ron_dallas Excel Programming 5 October 3rd 06 11:06 PM
move within ss by active cell position, NOT by cell names BEEJAY Excel Programming 2 August 23rd 06 04:34 PM


All times are GMT +1. The time now is 03:51 AM.

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

About Us

"It's about Microsoft Excel"