不要钻牛角尖,思路开阔点,看如下代码;
Private Sub combo1_click()
Combo2.Clear
Select Case Combo1.Text
Case "广东"
Combo2.AddItem "广州"
Combo2.AddItem "深圳"
Case "山西"
Combo2.AddItem "太原"
Combo2.AddItem "榆次"
End Select
End Sub
Private Sub Combo2_Click()
Dim Combotext As String
Dim i As Integer
Combotext = Combo2.Text
For i = 0 To Combo2.ListCount - 1
If Combo2.List(i) = Combotext Then
MsgBox "是第 " & (i + 1) & " 项"
End If
Next
End Sub
Private Sub Form_Load()
Combo1.AddItem "广东"
Combo1.AddItem "山西"
End Sub