gomindi Posted November 1, 2002 Posted November 1, 2002 I am new to programming and was hoping for a little direction. I am trying to code my combo box that I have created, anybody have any samples that I could look at? For example if they select an item, I want it to use this code, if they select the next item I want it to use this code etc. Thank you and sorry if this is too remedial for anyone. Quote
Moderators Robby Posted November 2, 2002 Moderators Posted November 2, 2002 try this out... Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles ComboBox1.SelectedIndexChanged Select Case ComboBox1.Text.ToString Case "test 1" 'Do something Case "test 2" 'Do something Case "test 3" 'Do something End Select End Sub Private Sub form1_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load ComboBox1.Items.Add("test 1") ComboBox1.Items.Add("test 2") ComboBox1.Items.Add("test 3") End Sub Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.