Another way....

Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)

If Not IsNumeric(Chr(KeyAscii)) Then KeyAscii = 0

End Sub
Ruchi