如果我有兩個combobox,第一個選項選擇後會有各自對應的選項讓下一個combobox選,但我的第二個combobox都不會顯示不知是何原因?
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim itmcb3 As String
Dim itmcb3i As Integer
Dim itmcb4 As String
Dim itmcb4i As Integer
'=====
For itmcb3i = 1 To 2
itmcb3 = Choose(itmcb3i, "TOYO", "TOSHIBA")
ComboBox3.Items.Add(itmcb3)
Next
Dim itmcb3select As Integer
itmcb3select = ComboBox3.SelectedIndex
If itmcb3select = 1 Then
For itmcb4i = 1 To 9
itmcb4 = Choose(itmcb4i, "125", "200", "250", "350", "500", "650", "800", "900", "1250")
ComboBox4.Items.Add(itmcb4)
Next
ElseIf itmcb3select = 2 Then
For itmcb4i = 1 To 5
itmcb4 = Choose(itmcb4i, "125", "200", "250", "350", "500")
ComboBox4.Items.Add(itmcb4)
Next
End If
End Sub 作者: tryit244178 時間: 2017-4-27 02:47 PM