I've a form with 3 textboxes and 2 buttons. Button 1 is enabled if all 3 textboxes are filled in. Button 2 is a quit program button. Let's see my code for the textboxes
Private Sub TextBoxes_TextChanged(
ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles _
TextBox1.TextChanged,
TextBox2.TextChanged,
TextBox3.TextChanged
Dim textBoxes = {TextBox1, TextBox2, TextBox3}
Button1.Enabled = textBoxes.All(Function(tb) tb.Text <> "")
End Sub
So now I am wondering how can I change the value of textbox 2 to only numerics and of textbox 1 and 3 to only text. I hope you'll understand my questions. I hope you guys can help me out.