954,551 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Multi functional label

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.

london-G
Junior Poster in Training
54 posts since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

I think you forgot to ask a question.

__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

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.

Oxiegen
Master Poster
715 posts since Jun 2006
Reputation Points: 87
Solved Threads: 141
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You