单击下拉框里的值后,让单击的值自动显示在后面的文本框里,这要怎么实现

2024-12-01 18:59:40
推荐回答(1个)
回答1:

Private Sub Combo1_click()
If Combo1.Text = "1" Then
Text1.Text = "1"
Else
Text1.Text = "2"
End If
End Sub

Private Sub Form_Load()
Combo1.AddItem "1"
Combo1.AddItem "2"
End Sub