In this Code Snippet we will know how to insert Only Digits in a TextBox.
Public Class Form1
Private Sub TextBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Char.IsDigit(e.KeyChar) Then
ElseIf e.KeyChar = ControlChars.Back Then
Else
e.Handled = True
End If
End Sub
End Class