J
Jacob
I need to populate a listbox with two columns from a named range (which
changes based on a combobox selection). the named range will consist
of two columns as well. here is what I have right now thanks to Nigel:
Private Sub ComboBoxgroupHSS_Change()
Dim c As Range
With UserFormDesign
.ListBoxHSS.Clear
For Each c In Range(.ComboBoxgroupHSS.Value)
If Len(Trim(c.Value)) > 0 Then .ListBoxHSS.AddItem c.Value
Next
End With
End Sub
The column count of the listbox is set to 2. this routine applies each
non zero cell from the range (regardless of column location) and puts
it into the first column of the listbox. I would like the first
column of the range to go into the first column of the listbox and
similarly the second column of the range into the second column of the
listbox. how is this done?
thanks
changes based on a combobox selection). the named range will consist
of two columns as well. here is what I have right now thanks to Nigel:
Private Sub ComboBoxgroupHSS_Change()
Dim c As Range
With UserFormDesign
.ListBoxHSS.Clear
For Each c In Range(.ComboBoxgroupHSS.Value)
If Len(Trim(c.Value)) > 0 Then .ListBoxHSS.AddItem c.Value
Next
End With
End Sub
The column count of the listbox is set to 2. this routine applies each
non zero cell from the range (regardless of column location) and puts
it into the first column of the listbox. I would like the first
column of the range to go into the first column of the listbox and
similarly the second column of the range into the second column of the
listbox. how is this done?
thanks