- Home
·
- Miscellaneous
·
- TextBox accepts only numeric value,backspace and single decimal
TextBox accepts only numeric value,backspace and single decimal
TextBox accepts only numeric value,backspace and single decimal
Rate TextBox accepts only numeric value,backspace and single decimal
(1(1 Vote))
Text1.Text = " "
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyBack Then Exit Sub
If KeyAscii = Asc(".") And InStr(1, Text1.Text, ".") = 0 Then
KeyAscii = Asc(".")
Exit Sub
End If
If Not IsNumeric(Chr(KeyAscii)) Then KeyAscii = 0
End Sub
TextBox accepts only numeric value,backspace and single decimal Comments
No comments yet — be the first to post one!
Post a Comment