Hello,
I'm trying to create a dependent combox on a userform, as followed in the tutorial on excel-easy.com, the contents of the second combobox are dependent on the selection in the first:
Private Sub cbo1_change()
Me.Cbo2.Clear
Dim index As Integer
index = cbo1.ListIndex
Select Case index
Case Is = 0
With Me.Cbo2
.AddItem "Custom"
End With
Case Is = 1
With Me.Cbo2.Value
.AddItem "Free"
End With
It works with the first selection,when I select "custom" in the first combobox, but then when I select "Free" in the first combobox, I get the error message 'run time 424 - object required'. I thought the object was already defined - in the listfill range in combobox1:
With ws
.cbo1.ListFillRange = "A2:A7"
End With
Any ideas?
Bookmarks