如何判断 [email protected]  中是否包含 @请大哥们给个代码,感谢

解决方案 »

  1.   

    if instr(1,"[email protected]","@")<>0 then
      msgbox "Got it"
    else
     msgbox "I am afraid not"
    end if
      

  2.   

    Private Sub Command1_Click()
    Dim strL As String
    strL = "[email protected]"If InStr(strL, "@") > 0 Then
     MsgBox "字符中包含 @"
     Else
     MsgBox "字符中没有@"
    End If
    End Sub
      

  3.   

    两位大哥的代码差不多,都可以哈,呵呵
    和 goosen大哥比起来,clear_zero大哥的instr函数后面跟着那个“1”代表什么呀,小弟初学,莫见笑呵呵