I have 3 combo boxes which are dependent to each other. On combo box 3, I want to add another list which it will depend on both combobox1 and 2. I'm using these code.
Private Sub UserForm_Initialize()
With ComboBox1
.AddItem "Animals"
.AddItem "Sports"
.AddItem "Food"
End With
End Sub
Private Sub ComboBox1_Change()
Dim index As Integer
index = ComboBox1.ListIndex
ComboBox2.Clear
Select Case index
Case Is = 0
With ComboBox2
.AddItem "Dog"
.AddItem "Cat"
.AddItem "Horse"
End With
Case Is = 1
With ComboBox2
.AddItem "Tennis"
.AddItem "Swimming"
.AddItem "Basketball"
End With
Case Is = 2
With ComboBox2
.AddItem "Pancakes"
.AddItem "Pizza"
.AddItem "Chinese"
End With
End Select
End Sub
On combo box 3 I want to add another items which it will depend on both combo boxes. Please help. Thanks.
Bookmarks