[code=vb]
Private Sub Text1_KeyPress( KeyAscii As Integer)
If (KeyAscii > 47 And KeyAscii < 58) Or KeyAscii = 46 Or KeyAscii = 8 Then
KeyAscii = KeyAscii
Else
KeyAscii = 0
End If
End Sub
[/code]
KeyAscii "8" is for backspace
and keyascii "46" for decimal
Use them if reqd
Last edited by debasisdas; Mar 19 '08, 07:10 AM.
Reason: added code=vb tags
Comment