View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alex St-Pierre Alex St-Pierre is offline
external usenet poster
 
Posts: 169
Default Referering sheet name of a named cell

Hello,
I have a named cell "ADJ_COMMENTS" which is on an other sheet. How can I
know the name of the sheet that contains this cell ?

Dim myRange as Range
On error resume Next
Set myRange = ThisWorkbook.Names("ADJ_COMMENTS").RefersToRange 'is it
better to used Set myRange = Range("ADJ_COMMENTS") ?
If myRange Is Nothing Then
Else
myAdress = myRange.Address 'gives me $A$1 ok
mySheet = myRange. ??? .Application.Sheet.Name doesn't work.

Thank you.
--
Alex St-Pierre