VB字符问题

来源:百度知道 编辑:UC知道 时间:2024/06/08 01:09:31
我怎样检查指定文本框中是否包含指定字符?

if instr(文本框,指字字符)>0 then
msgbox "包含"
else
msgbox "不包含"
end if

Private Sub Command1_Click()
If InStr(Text1.Text, "Text") > 0 Then
MsgBox ("you")
Else
MsgBox ("mei you")
End If
End Sub

a=InstrRev(text1.text,"指定字符")
if a>0 then
msgbox "包含字符"
else
msgbox "没有"
end if