vb 中检测是不是汉字?简单版

Dim str As String

Dim i

Dim charPra As String

str = Trim(Text1.Text)

For i = 1 To Len(str)

If Asc(Left(str, 1)) < 0 Then

'MsgBox Left(str, 1)

Text1.Text = ""

Text1.SelStart = 0

Text1.SelLength = 10

Cancel = True

End If

str = Mid(str, 2)

Next i