How to give number validate in textbox
take keypress event of textbox
Private Sub Txtqty_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Txtqty.KeyPress
Dim i As String = e.KeyChar.ToString
If i = "" Then
Else
If IsNumeric(i) Then
Else
e.Handled = True
MessageBox.Show("Enter valid Number")
End If
End If
End Sub
No comments:
Post a Comment