You're right. I "forgot" a line with
On Error Resume Next
Thanks!
LeoH
"keepITcool" skrev i en meddelelse
.com...
Leo,
your code will produce unhandled errors if book contains names with
either constants or formulas
--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam
Leo Heuser wrote :
Tetsuya
One way:
Sub GetName()
'Leo Heuser April 8, 2005
Dim Nam As Name
For Each Nam In ActiveWorkbook.Names
If Not Intersect(ActiveCell, Range(Nam.RefersTo)) Is Nothing
Then MsgBox Nam.Name
End If
Next Nam
End Sub