Hi, I am trying to get my form to validate user input. If it is ready to complete an operation (Valid input) it affects a read-only text box with "Ready" if not "Not Ready" the values that are accepted are 1-9999, it needs to check multiple boxes aswel (The code I have at the moment just makes sure one is valid)
Here is my current code
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged If TextBox2.Text = ("1") And TextBox2.Text = ("1") Then TextBox4.Text = ("Ready!") Else MsgBox("This is not valid!", MsgBoxStyle.Exclamation, "Error") TextBox2.Text = ("") End If End Sub
So the ("1") needs to accept 1-9999 as valid and it needs to make sure to check both fields. I guess it doesn't do that at the moment because it's in the "TextBox2_TextChanged" sub.