View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Clearing Names..

Do you mean

- all names in this workbook
- only names that refer to a range in this worksheet
- only names local to this worksheet?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"K Dales" wrote in message
...
Public Sub DeleteNames(SheetName As String)
Dim ThisName As Name

For Each ThisName In ThisWorkbook.Names
On Error GoTo Skip
If ThisName.RefersTo Like "=" & SheetName & "!*" Then ThisName.Delete
Skip:
Next ThisName

End Sub

"Darin Kramer" wrote:



Hi there,

Is there an easy way of deleting all defined names in a tab? (other than
selecting Insert, Names, Define, selecting them individually and then
delete)

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***