View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
oldyork90 oldyork90 is offline
external usenet poster
 
Posts: 20
Default Application.Selection.Name gives "=Sheet3!$A$1"; I want the name


Selection returns a 'fully absolute' address of the selected cells. If
you want to get the defined name you'll need to loop the names
collection for a matching absolute address. (This won't work if the
address has any 'relative' refs)


Thank you Garry

Ok, then shouldn't I be able to iterate here? (Didn't try to access a
member yet... didn't get past the debugger)

=============
dim n as Name

For Each n In Application.Selection.Names
Debug.Print "Here we are"
Next
===============

The error message says not supported. It's probably something dumb
I'm doing. The name is assigned to an absolute address. I also tried
selecting a multi cell range hoping that maybe the collection of names
would then populate. I may not understand what I see in the object
browser. This looks doable. Set me straight. Thanks again.