Hi All
I'm trying to populate listbox2 in a userform depending on the selection in listbox1
I've been going around in circles with this for a while without getting anywhere
below is what I have been trying
I have tried a few different methods without any luck
Any suggestions would be greatly appreciated
cheers
Paul
I'm trying to populate listbox2 in a userform depending on the selection in listbox1
I've been going around in circles with this for a while without getting anywhere
below is what I have been trying
I have tried a few different methods without any luck
Any suggestions would be greatly appreciated
cheers
Paul
VBA Code:
Private Sub ListBox1_Click()
If ListBox1.ListIndex = -1 Then
ListBox2.Clear
Else
If ListBox1.ListIndex = 0 Then
ListBox2.List = Sheet4.Range("K1:K43") 'this is a names range singlesingle
Else
If ListBox1.ListIndex = 1 Then
ListBox2.List = Sheet4.Range("O1:O35") 'this is a names range doublesingle
Else
If ListBox1.ListIndex = 2 Then
ListBox2.List = Sheet4.Range("S1:S43") 'this is a names range doubledouble
End If
End If
End If
End If
End Sub