Visual Basic Development Bookmark and Share   
 Home > Visual Basic Language > First Step
 

First Step

Hello.

I’m new to VB and the forum, I see from some of the other intelligent posts in the forum I’m in good hands.

I would be grateful if you people could point me in the correct direction with the correct code. I want to have a list in a combo box and on display a comment in a label on the basis of the selection.

Combo box = R Label comment “thank you�/span>

Combo Box =L Label comment “in advance�/span>

CANbus  Tuesday, March 18, 2008 7:31 PM

Code Snippet

Public Class Form1

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged

If ComboBox1.Text = "L" Then

Label1.Text = "Thank You"

End If

If ComboBox1.Text = "R" Then

Lable1.text = "In Advance"

End If

End Sub

End Class

jbaird-pa  Tuesday, March 18, 2008 11:37 PM

Code Snippet

Public Class Form1

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged

If ComboBox1.Text = "L" Then

Label1.Text = "Thank You"

End If

If ComboBox1.Text = "R" Then

Lable1.text = "In Advance"

End If

End Sub

End Class

jbaird-pa  Tuesday, March 18, 2008 11:37 PM

You can use google to search for other answers

Custom Search

More Threads

• write new line to text file
• Network Question
• Count property
• Simple VB to test serial port
• Accessing Public Function located in another Project referenced within the same Solution
• Device driver creation tutorial. Anyone please?
• reading binary data from varbinary(max)
• Make Form1 Buttons Move down from certain location
• Using a form to select what I want to see in a text box.
• button click if else statement