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
If this post helps you mark it as answer Thanks
http://msdn.microsoft.com/en-us/library/ms229644(v=vs.80).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1
http://stackoverflow.com/questions/11246198/how-to-only-allow-digits-and-dots-in-textbox-vb-net
Mark This Response as Answer -- Chandu http://www.dotnetfunda.com/images/dnfmvp.gif
Login to post response