I am using Visual Basic Express 2008.
I'm really new to this, so this one could sound really kind of a joke to you, but the thing I want to do is:
Have a text box (Textbox1) and I'd like by clicking a button to display the next array item starting from the first one, but actually it does only show the last one (comments(2)) everytime I click on the button. This is the code I added to my button:
Private Sub Button6_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button6.Click
Dim comments(2) As String
comments(0) = "Some text1.."
comments(1) = "Some text2.."
comments(2) = "Some text3.."
For i = 0 To 2
TextBox1.Text = comments(i)
Next
End Sub
I'm really new to this, so this one could sound really kind of a joke to you, but the thing I want to do is:
Have a text box (Textbox1) and I'd like by clicking a button to display the next array item starting from the first one, but actually it does only show the last one (comments(2)) everytime I click on the button. This is the code I added to my button:
Private Sub Button6_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button6.Click
Dim comments(2) As String
comments(0) = "Some text1.."
comments(1) = "Some text2.."
comments(2) = "Some text3.."
For i = 0 To 2
TextBox1.Text = comments(i)
Next
End Sub
Comment