View Single Post
  #6   Report Post  
Don Guillett
 
Posts: n/a
Default How to delete all defined names from a workbook?

This will do it.

Sub DeleteAllNames() 'ALL sheets
For Each Name In Names
Name.Delete
Next Name
End Sub

or

Sub DeleteHiddenNames()
Dim n As Name
Dim Count As Integer
For Each n In ActiveWorkbook.Names
If Not n.Visible Then
n.Delete
Count = Count + 1
End If
Next n
MsgBox Count & " hidden names were deleted."
End Sub
Don Guillett
SalesAid Software

"Dmitry Kopnichev" wrote in message
...
Hello
How to delete all defined names from a workbook?