vb combobox中,如何向下拉菜单添加选项,并且点击选项后能转入另一种算法?

2024-12-12 08:09:45
推荐回答(1个)
回答1:

Private Sub Combo1_Click()
Select Case Combo1.Text
Case "A"
Call 算法1
Case "B"
Call 算法2
Case "C"
Call 算法3
End Select
End Sub

Private Sub Command1_Click() '添加选项

Combo1.AddItem "A"
Combo1.AddItem "B"
Combo1.AddItem "C"
End Sub