Private Sub Command1_Click()
Dim i As Integer
Dim c As String
For i = 1 To Len(Trim(Text1.Text))
c = Mid(Text1.Text, i, 1)
If Asc(c) < 255 And Asc(c) > 0 Then
MsgBox "单字节"
Else
MsgBox "汉字"
End If
Next
End Sub
Dim i As Integer
Dim c As String
For i = 1 To Len(Trim(Text1.Text))
c = Mid(Text1.Text, i, 1)
If Asc(c) < 255 And Asc(c) > 0 Then
MsgBox "单字节"
Else
MsgBox "汉字"
End If
Next
End Sub