I always did it this way...

Code:
Private Sub txtStuff_keypress(KeyAscii as Integer)

If not isnumeric (Chr(KeyAscii)) and KeyAscii<>8 and KeyAscii<>46 then
Beep
KeyAscii = 0
End Sub
That allows for backspaces and decimal points...

[Edited by CyberSurfer on 11-04-2000 at 10:04 AM]