如何判定某个字符串中有小写字母?
谢谢!!!急急急急!!

解决方案 »

  1.   

    Private Sub Command1_Click()
    Dim str As String
    str = "AACc"
    If UCase(str) <> str Then MsgBox "有小写字母"
    End Sub
      

  2.   

    Dim i As Integer
    Dim s As Long
    If Len(Text1) < 1 Then Exit Sub
    For i = 1 To Len(Text1)
        s = Asc(Mid(Text1.Text, i, 1))
        If s > 97 And s < 122 Then
            MsgBox "有小写字母存在"
        End If
    Next i
      

  3.   

    Private Sub Command1_Click()If Text1 Like "*[a-z]*" Then MsgBox "yes"End Sub
      

  4.   

    public function ExistXchar(str as string) as boolean
      dim i as integer
      ExistXchar=false
      for i=1 to len(str)
        if mid(str,i,1)>asc("a") and mid(str,i,1)<asc("z") then
           ExistXchar=true
           exit function
        end if
      next
    end function
      

  5.   

    Private Sub Command1_Click()
       Dim str As String
       str = "BBDd"
       If UCase(str) = str Then
          Debug.print "米有小写字母"
       Else
          Debug.print "有小写字母"
       End if
    End Sub