Private Sub TextBox_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress
If Char.IsControl(e.KeyChar) Then
Exit Sub
End If
If Not Char.IsNumber(e.KeyChar) Then
e.Handled = True
End If
End Sub
HTH
Rigga.
"Massy" <an*******@discussions.microsoft.com> wrote in message
news:20**********************************@microsof t.com...
Does anyone know how can ensure that the only input that is accepted into
a textbox is a numeric (only digits 1-9 accepted)?
Is this possible?
I am using vb.net to create a windows app.
thx folks