Hi all,
I try to add items to my combobox with .additem
I notice that when i test it, it counts up.
So when i press A and after that B in cbo1 it shows 1, 2, 3 and 4 in cbo2.
It should only show 3 and 4 when i select B in cbo1 and only show 1 and 2 when i select A.
Someone knows how to do this?
I try to add items to my combobox with .additem
I notice that when i test it, it counts up.
So when i press A and after that B in cbo1 it shows 1, 2, 3 and 4 in cbo2.
It should only show 3 and 4 when i select B in cbo1 and only show 1 and 2 when i select A.
Someone knows how to do this?
VBA Code:
Private Sub cbo1_Change()
If cbo1.Value = "A" Then
With cbo2
.AddItem "1"
.AddItem "2"
End With
Else
If cbo1.Value = "B" Then
With cbo2
.AddItem "3"
.AddItem "4"
End With
Else
If cbo1.Value = "Tag(s)" Then
With cbo2
.AddItem "5"
End With
End If
End If
End If
End Sub