Populate a list box with named ranges.....

  • Thread starter Thread starter Chris Salcedo
  • Start date Start date
C

Chris Salcedo

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
 
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

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

Thanks..
Chris

zzZZZZZz...
 
Back
Top