0

hello
I have strings here, ecah stored individually
a = hello
b = bye
c= hi

Label1.text = a
label1.text = b
label1.text = c
it is in the command button sub and i want them to show respectively when the button is clicked like this:
a first, then b, then c.

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Oxiegen
0

Try this in the command buttons click event:

Private buttonClickIndex As Integer = 0

Private Sub Command1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
     If buttonClickIndex = 0 Then
          label1.Text = "hello"
          buttonClickIndex = 1
     ElseIf buttonClickIndex = 1
          label1.Text = "bye"
          buttonClickIndex = 2
     ElseIf buttonClickIndex = 2
          label1.Text = "hi"
          buttonClickIndex = 0
     End If
End Sub

hello
I have strings here, ecah stored individually
a = hello
b = bye
c= hi

Label1.text = a
label1.text = b
label1.text = c
it is in the command button sub and i want them to show respectively when the button is clicked like this:
a first, then b, then c.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.