View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Application.Selection.Name gives "=Sheet3!$A$1"; I want the name

Oops.., missing a closing parenthesis...

Example1: (uses Intersect function)
If Intersect(Selection, Range("homecell")) Then "True" Else "False"

...sorry about that!

Also, I mentioned looping the names collection but omitted an example
and so...

Dim nam As Variant
For Each nam In ActiveSheet.Names '//assumes local scope
If Selection.Name.Name = nam Then
'//do stuff
Exit For '//quit looking
End If
Next 'nam

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion