Deleting All Range Names

J

Jim

Is there an easy way to delete a group of range names or all the range names
in a sheet at one time? The only way that I am aware of is to delete each
range name separately.
 
M

Michael Bednarek

Is there an easy way to delete a group of range names or all the range names
in a sheet at one time? The only way that I am aware of is to delete each
range name separately.

Sub DelAllRanges()
Dim rngRange As Name
For Each rngRange In ActiveWorkbook.Names
rngRange.Delete
Next rngRange
End Sub
 
D

Don Guillett

or try this
Sub DeleteAllNames_Umlas()
ExecuteExcel4Macro "SUM(DELETE.NAME(NAMES()))"
End Sub
 
Top