I am using a simple code to run a game for my students and I am getting an error. I'm not certain what the issue is as I have the same code on another slide and it works.
Private Sub CommandButton21_()
ComboBox21.Visible = False
ComboBox22.Visible = False
ComboBox23.Visible = False
With ComboBox21
.Clear
.AddItem "What………you do everyday?", 1
.AddItem "Where………she go yesterday?", 2
.AddItem "Why…………she go in for the tennis this year?", 3
.AddItem "Whom……you send the email to yesterday?", 4
.AddItem "What day………….they go to the gym?", 5
.AddItem "Whom…………you usually help?", 6
.AddItem "Whose book……….you take yesterday?", 7
.AddItem "What time…………….she usually come home?", 8
.AddItem "How long………they train last year?", 9
.AddItem "What book………he read everyday?", 10
.AddItem "Where…….you often go in the evening?", 11
.AddItem "Where………they come from 2 years ago?", 12
.AddItem "What subjects……he excel at?", 13
.AddItem "What subject……you like last year?", 14
End With
With ComboBox22
.Clear
.AddItem "do", 1
.AddItem "did", 2
.AddItem "did", 3
.AddItem "did", 4
.AddItem "do", 5
.AddItem "do", 6
.AddItem "did", 7
.AddItem "does", 8
.AddItem "did", 9
.AddItem "does", 10
.AddItem "do", 11
.AddItem "did", 12
.AddItem "does", 13
.AddItem "did", 14
End With
End Sub
Private Sub CommandButton22_Click()
For k = 1 To 14
ComboBox21.ListIndex = k .....(debug error shows up here)
ComboBox22.ListIndex = k
If yourresponse = ComboBox22 Then
MsgBox "Awesome"
Else
MsgBox "Try again"
End If
Next k
End Sub
Bookmarks