Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Populate a list box with named ranges.....

I am trying to populate a list box with all the named ranges in a
sheet. The following code gives me only the refers to portion of the
name not the name itself. What am I doing wrong ???


Private Sub UserForm_Initialize()
For Each nName In Names
Me.ListBox1.AddItem (nName)
Next nName
End Sub

Thanks

Chris

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Populate a list box with named ranges.....

Hi Chris,

Try:

'============
Private Sub UserForm_Initialize()
Dim nName As Name
For Each nName In Names
Me.ListBox1.AddItem (nName.Name)
Next nName
End Sub

'<<============


---
Regards,
Norman



"Chris Salcedo" wrote in message
oups.com...
I am trying to populate a list box with all the named ranges in a
sheet. The following code gives me only the refers to portion of the
name not the name itself. What am I doing wrong ???


Private Sub UserForm_Initialize()
For Each nName In Names
Me.ListBox1.AddItem (nName)
Next nName
End Sub

Thanks

Chris



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Populate a list box with named ranges.....

Well that did it. It was so simple the that I just couldnt see it...
Its time for bed......

Thanks..
Chris

zzZZZZZz...

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
Named ranges dissapear from list Susan Excel Discussion (Misc queries) 4 September 6th 08 04:39 AM
Create list of Named Ranges Jim Tibbetts Excel Worksheet Functions 4 February 15th 07 05:29 PM
Viewing List of Named Ranges Graham Parkinson Excel Discussion (Misc queries) 2 December 3rd 04 01:30 PM


All times are GMT +1. The time now is 11:43 PM.

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"