Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress 'MessageBox.Show(e.KeyChar) If IsNumeric(e.KeyChar) Then End If end sub