例如判断Text1.Text="a"或"b"或'c"
如何写?各位不要见笑哦,小弟初学
如何写?各位不要见笑哦,小弟初学
解决方案 »
- vb 如何改变excel(i, j)的单元格背景颜色,急啊!!!!!!!!!
- 如何判断窗口分辨率为1024*768、800*600或其它分辨率,
- vb如何调用vb写的dll
- 串口程序怎么写?
- 求代码:将文本(来自textbox或*.txt)转换为二进制,存入Access2000数据库。
- 讨论一下:请问各位有没有用 xml 做过多语言支持?和传统的 ini 形式有什么优势和不足呢?
- 有这样一个项目???
- vb如何得到當前登陸windows的用戶名?
- 如何在VB里通过API接受声卡里来的声音
- 请问各位大虾,VB中的sourcesafe是干什么用的,有什么功能,麻烦讲详细点,谢谢,十分钟之类给分。
- 如何在不同窗体(模块)过程间传递“自定义结构”体数组
- 能否动态改变子菜单的内容
If Text1.Text = "a" Or Text1.Text = "b" Or Text1.Text = "c" Then
MsgBox "通过"
Else
MsgBox "没有"
End IfEnd Sub
If Text1.Text = "a" Or Text1.Text = "b" Or Text1.Text = "c" Then
.......
Else
.........
End IfEnd Sub
MsgBox "通过"
Else
MsgBox "不能通过"
End If
If Combo1.Text = "单价" Or "实际购价" Then
MsgBox ("good")
End If
会提示"类型不匹配"
如何解决?
temp=str(combo1l.text)
If Combo1.Text = "单价" Or "实际购价" Then
MsgBox ("good")
End If
If Combo1.Text = "单价" Or Combo1.Text = "实际购价" Then
MsgBox ("good")
End If
End Sub
if text1.text like [abc] then
Dim I As Long<设定数组A()的值,比如:A()=Split("a,b,c",",")>For I=1 To Ubound(A)
tOutNum=(Text1.Text=A(I) And I)
tOutBool=CBool(tOutNum)
If tOutBool Then Exit For
NexttOutNum字符串的数组编号。如果Text1.text=B则返回2
tOutBool是Text1.text是否等于其中一个的布尔值。
tOutBool=CBool(Instr("a,b,c,",Text1.Text & ","))
End If
MsgBox UBound(Filter(Array("a", "b", "c"), Text1.Text)) = "-1" '不包含
End Sub
select case text1.text
case "a","b","c"
msgbox "呵呵"
end select
Case "a", "b", "c"
' 是
...
End Select