ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete LOCAL named ranges (https://www.excelbanter.com/excel-programming/318600-delete-local-named-ranges.html)

Greg

Delete LOCAL named ranges
 
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 dont need.

Thank you in advance,

______
Regards,
Greg

Jack Sheet

Delete LOCAL named ranges
 
Sub RemoveNames()
Dim MyName As Name
For Each MyName In Worksheets("Sheet1").Names
MyName.Delete
Next MyName
End Sub

Regards

--
Return email address is not as DEEP as it appears
"Greg" wrote in message
...
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




Dave Peterson[_5_]

Delete LOCAL named ranges
 
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.



Greg wrote:

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 dont need.

Thank you in advance,

______
Regards,
Greg


--

Dave Peterson


All times are GMT +1. The time now is 09:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com