VB写如下条件代码:在下拉组合框中,选中哪一项,哪一项消失。
展开全部
Dim 选中序号 As Integer
Private Sub ComboBox1_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles ComboBox1.SelectionChangeCommitted
If ComboBox1.SelectedIndex >= 0 Then
选中序号 = ComboBox1.SelectedIndex
End If
ComboBox1.Items.RemoveAt(选中序号)
ComboBox1.Refresh()
End Sub
Private Sub ComboBox1_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles ComboBox1.SelectionChangeCommitted
If ComboBox1.SelectedIndex >= 0 Then
选中序号 = ComboBox1.SelectedIndex
End If
ComboBox1.Items.RemoveAt(选中序号)
ComboBox1.Refresh()
End Sub
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询