if instr(1,"[email protected]","@")<>0 then msgbox "Got it" else msgbox "I am afraid not" end if
Private Sub Command1_Click() Dim strL As String strL = "[email protected]"If InStr(strL, "@") > 0 Then MsgBox "字符中包含 @" Else MsgBox "字符中没有@" End If End Sub
msgbox "Got it"
else
msgbox "I am afraid not"
end if
Dim strL As String
strL = "[email protected]"If InStr(strL, "@") > 0 Then
MsgBox "字符中包含 @"
Else
MsgBox "字符中没有@"
End If
End Sub
和 goosen大哥比起来,clear_zero大哥的instr函数后面跟着那个“1”代表什么呀,小弟初学,莫见笑呵呵