Delete LOCAL named ranges

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I downloaded the Name Manager developed by Excel MVP Jan Karel Pieterse and
it is a great add-in, taking my hat off.

But I need to have some code at the end of my macro that would get rid of
the named ranges that are local to a sheet. I am running some external query
from Yahoo and it creates a bunch of local named ranges I don’t need.

Thank you in advance,

______
Regards,
Greg
 
Sub RemoveNames()
Dim MyName As Name
For Each MyName In Worksheets("Sheet1").Names
MyName.Delete
Next MyName
End Sub

Regards
 
I think I'd use Jan Karel's addin to find those names (or a common trait in
those names).

Then just delete those particular names.

You can delete worksheet level names that excel uses for other things and
strange things can happen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top