Check this out :

If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> 
Asc(vbBack) And KeyAscii <> 13 Then
    KeyAscii = 0
Else
    if KeyAscii =13 then Command1.SetFocus
End If


==============
Permisi semua nya.

Saya minta bantuan temen-temen sekalian,

Saya mw validasi agar input hanya berupa angka!

Ato berupa "tombol enter"

Sedikit codingnya:

Private Sub Text3_Keypress(
KeyAscii As Integer)

If (Not KeyAscii >= Asc("0") Or Not KeyAscii <= Asc("9")) _

Or KeyAscii <> Asc(vbBack) Or Not KeyAscii = 13 Then

MsgBox "Input harus berupa angka", vbOKOnly, "Warning"

Text3.Text = ""

End If

If KeyAscii = 13 Then

Command1.SetFocus

End If

Kirim email ke