Private Sub txSN_KeyPress(KeyAscii As Integer)
Const xStr As String = "0123456789"
KeyAscii = IIf(InStr(xStr & Chr(8), Chr(KeyAscii)), KeyAscii, 0)
End Sub
VB输入框只允许输入数字
最新推荐文章于 2022-04-08 22:07:46 发布
Private Sub txSN_KeyPress(KeyAscii As Integer)
Const xStr As String = "0123456789"
KeyAscii = IIf(InStr(xStr & Chr(8), Chr(KeyAscii)), KeyAscii, 0)
End Sub