Private Sub TxtVendorID_KeyPress(KeyAscii As Integer)
Call CheckoutNumber(KeyAscii, 1)
End Sub
Public Sub CheckoutNumber(TmpKeyascii As Integer, Mode As Integer)
'Mode 使用过程的方式,0 调用限制数字框 1 调用限制文本框 2 允许输入小数点
If TmpKeyascii = 8 Then Exit Sub
Select Case Mode
Case 0
If (TmpKeyascii < 48 Or TmpKeyascii > 59) And TmpKeyascii <> 13 Then
TmpKeyascii = 0
End If
Case 1
If TmpKeyascii = 39 Then
TmpKeyascii = 0
End If
Case 3
If (TmpKeyascii < 48 Or TmpKeyascii > 59) And TmpKeyascii <> 46 Then
TmpKeyascii = 0
End If
End Select
End Sub