codice:
Private Sub TuoTextBox_KeyPress(KeyAscii As Integer) 
   If InStr("0123456789", Chr$(KeyAscii)) = 0 Then KeyAscii = 0 
End Sub