Delete all Range Names Except for 1 Q

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

I have the following code which deletes all Range Names in a Workbook.
How would I delete all except for 1 Range Name called "MyUsers"

For Each nName In ActiveWorkbook.Names
nName.Delete
Next


Thanks
 
For Each nName In ActiveWorkbook.Names
If nName.Name <> "MyUsers" Then
nName.Delete
End If
Next

- Jon
 
Back
Top