View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Umlas Bob Umlas is offline
external usenet poster
 
Posts: 301
Default Phantom named ranges in a workbook?

Names can be hidden.
Activeworkbook.Names("XYZ").Visible = False
would hide the name.
Run this code to unhide them:
Sub UnhideNames()
For each Nme in Activeworkbook.Names
Nme.Visible = True
Next
End Sub

Bob Umlas
Excel MVP

"Dave O" wrote in message
oups.com...
As an exercise I ran this code on a spreadsheet I've been using for
several years, which has been updated through several Excel releases.
It shows 76 named ranges, mostly starting with "HTML_" ; I have used
this file to manipulate data copied and pasted from web pages. The
.RefersTo shows a mix of values assigned and cell references. When I
click ~Insert ~Name ~Define, however, only one named range appears in
the list.

How does this spreadsheet have named ranges that do not appear in the
Name Define list?

Thanks- the code follows:

Sub Named_Range_Show()
Dim NamedRange As Variant
For Each NamedRange In ActiveWorkbook.Names
MsgBox NamedRange.Name & ": " & NamedRange.RefersTo
Next NamedRange
End Sub