Private Sub Text4_KeyPress(KeyAscii As Integer)
'''''''只允许输入数字及小数点
If KeyAscii = 13 Then SendKeys "{tab}"
If Not (Chr(KeyAscii) Like "[0-9.]" Or KeyAscii < 32) Then
KeyAscii = 0
If KeyAscii = 13 Then
Text4.SelStart = 0
Text4.SelLength = Len(Text4.Text)
End If
End If
End Sub
'''''''''只允许输入数字
Private Sub txt_qty_KeyPress(KeyAscii As Integer)
If Not (Chr(KeyAscii) Like "[0-9]" Or KeyAscii < 32) Then ''''''只能输入数字,不能输入小数点及其它
'MsgBox "请输入数字!"
KeyAscii = 0
End If
End Sub
阅读(105) | 评论(0) | 转发(0) |