Allow Numbers
Allow only numbers along with one deciaml.
Rate Allow Numbers
(4(4 Vote))
'***********************************************************
' This code only allows numbers along with one decimal
' point in text box named txtNumber. Also allow backspace.
'***********************************************************
If KeyAscii > 47 And KeyAscii < 58 Or KeyAscii = 8 Or KeyAscii = 46 Then
If KeyAscii = 46 Then
If InStr(txtNumber.Text, ".") Then
KeyAscii = 0
Exit Sub
Else
txtNumber.Text = txtNumber.Text
End If
Else
End If
Else
KeyAscii = 0
End If
Allow Numbers Comments
No comments yet — be the first to post one!
Post a Comment