View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default hide / unhide names

Hi Michael,

a) How do you hide range names


Sub CreateHiddenName()
ActiveWorkbook.Names.Add "MyName", _
Worksheets("Sheet1").Range("A1:A10")
ActiveWorkbook.Names("MyName").Visible = False

End Sub

b How do you unhide range names


Sub MakeAllNamesVisible()
Dim NM As Name

For Each NM In ActiveWorkbook.Names
NM.Visible = True
Next

End Sub

---
Regards,
Norman



"Michael Beckinsale" wrote in message
...
Hi,

Whilst reviewing a spreadsheet created by somebody else l have come across
something l have never seen before !

Hidden range names

Can somebody please tell me :

a) How do you hide range names
b How do you unhide range names

I have carefully inspected the VBA Modules in the workbook and there isn't
any code relating to hiding / unhiding range names. The cells containing
the
hidden names have not been hidden using Cells,Protection,Hide and anyway
the
worksheets / workbook are not protected.

I can identify and unhide the using Karl Patrese's Name Manager but l
would
like to know how its done. On reviewing the VBA code contained in the
workbook l think it is unlikely that the original author hid some 40 codes
spread across many randon cells and worksheets by code then deleted it.

All contributions gratefully received

Regards

Michael Beckinsale