Hey, I have a form with 3 labels, a textbox and a button. I want to write a number in the textbox (1-3) and then press the button. Then, if the number in the textbox is 1, I want to write in label1 "TEST", if it's 2 I want to write in label2 etc. I know I can do it with a whole lot of if statements, but I think there has to be a way to do it simply.
I've tried this:
But it obviously didn't work...Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label(TextBox1.Text).text = "TEST" End Sub
Hope someone can help![]()




Reply With Quote