限制文本框中只能输入一个汉字字符?
Private Sub Text1_Change()
If Text1.Text = "" Then
Exit Sub
End If
For i = 1 To Len(Text1.Text)
If Asc(Mid(Text1.Text, i, 1)) > 0 Then

MsgBox "请输入汉字"
Exit Sub
End If
Next

End Sub

引用地址:https://www.dfbys.cn/archives/8.html

  留言暂时关闭