K
KIM W
I am attempting to fill a combo box with the list ow Named Ranges with names
that begin with "List*. I successfully get the names into a text box (see
commented out code below), but whrn I attempt to write it to the combobox, I
get "Object doesn't support prroperty or method."
How do I write the list to a commbo box?
Ultimately, I am going to use the selected name range to populate a
multi-select listbox (which is working with hard coded Named Range in it.)
Thanks in advance, you generous souls. I have indeeed searched the forum,
and it does look to me like I am doing this correctly.
Private Sub UserForm_Initialize()
Dim nMames As Names
Dim nName As Name
Dim r As Variant
r = ""
For Each nName In Application.ThisWorkbook.Names
If nName.Name Like "List*" Then
r = r & nName.Name & Chr(10)
End If
Next nName
'MsgBox r
Sheets("Sheet1").ComboBox1.List = r
End Sub
that begin with "List*. I successfully get the names into a text box (see
commented out code below), but whrn I attempt to write it to the combobox, I
get "Object doesn't support prroperty or method."
How do I write the list to a commbo box?
Ultimately, I am going to use the selected name range to populate a
multi-select listbox (which is working with hard coded Named Range in it.)
Thanks in advance, you generous souls. I have indeeed searched the forum,
and it does look to me like I am doing this correctly.
Private Sub UserForm_Initialize()
Dim nMames As Names
Dim nName As Name
Dim r As Variant
r = ""
For Each nName In Application.ThisWorkbook.Names
If nName.Name Like "List*" Then
r = r & nName.Name & Chr(10)
End If
Next nName
'MsgBox r
Sheets("Sheet1").ComboBox1.List = r
End Sub