Forum Discussion
GeorgieAnne
Jul 08, 2022Iron Contributor
Named Ranges with _xlfn. prefixes
Hello, I have some VBA code to makes a list of Named Ranges in a workbook. It then visits each of these named ranges and grabs some data from them for further processing. Today, I had this code ...
PeterBartholomew1
Jul 08, 2022Silver Contributor
My recollection is that the hidden system names appear when a worksheet containing new functions is opened in an older Excel version that does not support them. You could modify your VBA to test for names starting "_xlfn" and exit the loop whenever it finds one. It may also be useful to skip names that refer to valid formulas but are not range references. They will have a '.RefersTo' property but there will be no 'RefersToRange' property.
GeorgieAnne
Jul 08, 2022Iron Contributor
Thanks PeterBartholomew1,
I am stumped. As I mentioned none of these formulas are being used. All the machines that opened the workbook has the same version of MS-Excel, and as you suggested I have added code to check for "_xlfn." in the Range Name and not to process it. That is a solution, but I am still curious as to what happened. I ran the repair utility on my development machine as I opened the workbook, and nothing changed. So???
Would you happen to know a way to get the Scope property of a Named Range?
Georgie Anne
I am stumped. As I mentioned none of these formulas are being used. All the machines that opened the workbook has the same version of MS-Excel, and as you suggested I have added code to check for "_xlfn." in the Range Name and not to process it. That is a solution, but I am still curious as to what happened. I ran the repair utility on my development machine as I opened the workbook, and nothing changed. So???
Would you happen to know a way to get the Scope property of a Named Range?
Georgie Anne