Hi!
I have added this same bit of code in a few userform but it works as intended (ie. show all 3 columns of the combobox) only in the first userform created. In the subsequent userforms it only shows the first column. I can't seem to figure out why? Any of you have an idea?? Private Sub UserForm_Initialize()
Dim cell_Participant As Range
Dim ws1 As Worksheet
Set ws1 = Worksheets("Participant Lookup List")
For Each cell_Participant In ws1.Range("StudentID")
With Me.Comboparticipant
.AddItem cell_Participant.Value
.List(.ListCount - 1, 1) = cell_Participant.Offset(0, 1).Value
.List(.ListCount - 1, 2) = cell_Participant.Offset(0, 2).Value
End With
Next cell_Participant
End Sub
I have added this same bit of code in a few userform but it works as intended (ie. show all 3 columns of the combobox) only in the first userform created. In the subsequent userforms it only shows the first column. I can't seem to figure out why? Any of you have an idea?? Private Sub UserForm_Initialize()
Dim cell_Participant As Range
Dim ws1 As Worksheet
Set ws1 = Worksheets("Participant Lookup List")
For Each cell_Participant In ws1.Range("StudentID")
With Me.Comboparticipant
.AddItem cell_Participant.Value
.List(.ListCount - 1, 1) = cell_Participant.Offset(0, 1).Value
.List(.ListCount - 1, 2) = cell_Participant.Offset(0, 2).Value
End With
Next cell_Participant
End Sub