Sub Text1_KeyPress (KeyAscii As Integer) Dim N$ N = "0123456789." If KeyAscii <> 8 Then If InStr(N, Chr(KeyAscii)) = 0 Then Beep KeyAscii = 0 Exit Sub End If End If End Sub