Even easier:

Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
    If IsNumeric(Chr(KeyAscii)) <> True Then KeyAscii = 0
End Sub