你们可以帮我查一下这段代码吗? 如果用户不从列表框中选择任何选项,我想尝试显示flash消息
Public Sub btnHVM_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHVM.Click
ListBoxHVM.Visible = True
Code =ListBoxHVM.SelectedValue
If Code = "" Then
Dim Message As String = "Please make a selection"
MessageBox.Show(Message)
End If
If Code = "B" Then
ChooseB1(Station)
ChooseB2(Station)
End If
If Code = "A" Then
ChooseA1(Station)
ChooseA2(Site)
ChooseA3()
End If
End Sub
答案 0 :(得分:0)
您必须将ListBoxHVM.SelectedValue
分配给code
Code=ListBoxHVM.SelectedValue
编辑2
If code = "" Then