ActiveWorkbook.Names rogue entries

Gates Is Antichrist

Well-known Member
Joined
Aug 15, 2002
Messages
1,961
I have code

Set nms = ActiveWorkbook.Names
For Each c In nms

and get a c.name="'Sheet4'!_Regression_Int"

Note that this means it's a "sheet-local" defined name. _Regression_Int isn't even in google, which signifies Armageddon, AFAIC. Other ones are
"'Sheet4'!ALR"
"'Sheet4'!ALRN"
"'Sheet4'!ANTLRN"

I'm assuming that these are not part of Excel; thus a prior user must have created them. I'd like to strip them out. Apparently they're unused.

However they're not in (insert/names/define) list - even though Sheet4 is active. I can't even see them, much less delete them. What am I missing here?

** EDIT 9-28-06: ALR, ALRN and ANTLRN are in fact in the define list, but not _Regression_Int. My bad **
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi Gates,
Try this on a blank sheet and see if it tells you where the range(s) is/are.
Code:
[a1].ListNames

Any ranges not desired should be able to be deleted with more code. (And I guess you don't
really need to know where they are for that if you know their names.
 
Upvote 0
Thanks for the suggestion. No, they're not in [a1].ListNames.

Sure, I can terminate them from the code (although, not exactly effortlessly) ... but I still don't get what's going on here. They're little mysterious Underwear Gnomes that only appear when you're not looking. I wish I knew how they got there, and where are they seen in the Excel non-VBA interface.
 
Upvote 0
Foolish me - half foolish anyway. I actually did go to a blank sheet (thank you for the thoughtfulness, since A1:B?? gets overwritten :) :) ). Local defined ranges would be invisible there anyway.

But if I actually go to Sheet4, _Regression_Int is not found by either .Listnames or alt-I/N/D. Maybe the leading underscore means it's an internal variable?
 
Upvote 0

Forum statistics

Threads
1,218,656
Messages
6,143,731
Members
450,502
Latest member
sakaria_123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top