Use this same information that I gave you before just replace the decimal representations:
Public Function CustomKeys(KeyAscii As Integer) As Integer
Select Case KeyAscii
Case 46, 48 To 57
Case Else
KeyAscii = 0
End Select
CustomKeys = KeyAscii
End Function
Then call it in the text keypress event:
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = CustomKeys(KeyAscii)
End Sub
This will take care of #'s 0 - 9 and '.'
If you are wondering what other characters are go to
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.