自己顶一下

解决方案 »

  1.   

    instr函数
      
    *****************************************************************************
    欢迎使用CSDN论坛阅读器 : CSDN Reader(附全部源代码) 
    http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html
      

  2.   

    Private Function CheckStr(ByVal str As String) As Boolean
    Dim I As Integer
    Dim tmp As String
    CheckStr = True
    For I = 1 To Len(str)
        tmp = Mid$(str, I, 1)
        If (Asc(tmp) >= 97 And Asc(tmp) <= 122) Or (Asc(tmp) >= 65 And Asc(tmp) <= 90) Then
            CheckStr = False
            Exit For
        End If
    Next IEnd Function
      

  3.   

    Private Function CheckStr(ByVal str As String) As Boolean
        Dim i As Long
        For i = 0 To 25
            If InStr(1, str, Chr(65 + i)) Then
                CheckStr = True
                Exit For
            End If
        Next
    End Function
      

  4.   

    更正:
    Private Function CheckStr(ByVal str As String) As Boolean
        Dim i As Long
        str = UCase(str)
        For i = 0 To 25
            If InStr(1, str, Chr(65 + i)) Then
                CheckStr = True
                Exit For
            End If
        Next
    End Function