如何判断我的textbox输入的是英文?

解决方案 »

  1.   

    Private Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii < 0 Then
            '中文
        Else
        
        End If
    End Sub
      

  2.   

    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii > 64 And KeyAscii < 91 Or KeyAscii > 96 And KeyAscii < 123 Then
    MsgBox "english”"
    End If
    End Sub
      

  3.   

    If c > "~" Then 
         MsgBox "汉字" 
        ElseIf IsNumeric(c) Then 
         MsgBox "数字" 
        ElseIf (c >= "A" And c <= "Z") Or (c >= "a" And c <= "z") Then 
         MsgBox "英文" 
        End If