作者GUNDAMJACK (GUNDAMJACK)
看板Visual_Basic
标题[.NET] combobox不重复
时间Sun Nov 6 23:47:08 2011
大家好
我想要让每个combobox选到不一样的东西
Dim X As Integer
Dim y As Integer
X = Combobox1.SelectedIndex
y = Combobox2.SelectedIndex
If X = y Then
MsgBox("不能重复物种名称")
End If
Return
完全没反应
请问哪里错了吗
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.63.176
1F:→ brian90191:两个combox的项目是完全一样的吗? 11/07 00:17
2F:推 serhgrt:同楼上,项目同?又或combobox1和combobox2都有写到这段吗? 11/07 07:56
3F:推 serhgrt:不然就是侦错一下是否有跑到这段,看看Selectedindex的值 11/07 08:03
4F:→ MOONRAKER:看不出来这有没有写在selectedindexchanged事件里面。 11/07 11:46