Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
DZ DZ is offline
external usenet poster
 
Posts: 29
Default Getting list of named ranges

Hello

I want to get A list of the ranges that i have named in a workbook that I
did not create. I named 2 ranges

But when I run the following code, I get the 2 ranges I named plus
additional names that I did not create and that don't appear in the define
names dialog.
These other names are as follows and I have no idea what they are or where
they came from but they are not listed in the Define Name dialog box.

'FT Claims'!_FilterDatabase
'PT Claims'!_FilterDatabase
'Midland Account'!_FilterDatabase

I want the code to only return the named ranges (which are the names listed
in the Define Name dialog)

Here is the code I used


Sub GetNamedRanges()
Dim nMames As Names
Dim nName As Name

For Each nName In Application.ThisWorkbook.Names
MsgBox nName.Name
Next nName

End Sub

--
DZ
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Getting list of named ranges

Sub GetNamedRanges()
Dim nMames As Names
Dim nName As Name

For Each nName In Application.ThisWorkbook.Names
If Not nName.Name Like "*_FilterDatabase" And _
Not nName.Name Like "*Print_Area" And _
Not nName.Name Like "*Print_Titles" And _
Not nName.Name Like "*wvu.*" And _
Not nName.Name Like "*wrn.*" And _
Not nName.Name Like "*!Criteria" And _
Not nName.Name Like "*xlfn.*" Then
MsgBox nName.Name
End If
Next nName

End Sub



--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"DZ" wrote in message
...
Hello

I want to get A list of the ranges that i have named in a workbook that I
did not create. I named 2 ranges

But when I run the following code, I get the 2 ranges I named plus
additional names that I did not create and that don't appear in the define
names dialog.
These other names are as follows and I have no idea what they are or where
they came from but they are not listed in the Define Name dialog box.

'FT Claims'!_FilterDatabase
'PT Claims'!_FilterDatabase
'Midland Account'!_FilterDatabase

I want the code to only return the named ranges (which are the names
listed
in the Define Name dialog)

Here is the code I used


Sub GetNamedRanges()
Dim nMames As Names
Dim nName As Name

For Each nName In Application.ThisWorkbook.Names
MsgBox nName.Name
Next nName

End Sub

--
DZ



  #3   Report Post  
Posted to microsoft.public.excel.programming
DZ DZ is offline
external usenet poster
 
Posts: 29
Default Getting list of named ranges

Thanks That did it.

Now I'm very curious. What are those other names that you filtered out. How
are they created. Where do they come from?

DZ
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Getting list of named ranges

They are system generated names that are created when you use certain system
functionality.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"DZ" wrote in message
...
Thanks That did it.

Now I'm very curious. What are those other names that you filtered out.
How
are they created. Where do they come from?

DZ



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation list from Named Ranges Mik Excel Worksheet Functions 5 July 30th 09 10:32 PM
list of named ranges rolando Excel Discussion (Misc queries) 3 November 4th 08 08:22 PM
Create list of Named Ranges Jim Tibbetts Excel Worksheet Functions 4 February 15th 07 05:29 PM
Drop-down-list with Named ranges Chootje Excel Programming 2 August 4th 06 12:49 PM
Printing a list of all named ranges Joe Smith Excel Programming 3 October 2nd 03 08:21 PM


All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"