Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: If ComboBox equals an item on the list then do this?

A.Sidhu:

I'm doing a program on Visual Basic Community 2017, that has a serious of ComboBoxes with various dropdown items. If there is a certain combination of the Comboboxes, then open this form. How would I implement this?

E.g

ComboBox1 items (string) = 1, 2, 3 ,4 ,5

ComboBox2 items (string) = a, b, c, d, e

ComboBox 3 items (string)= A, B, C, D, E

The user picks 1,a,A

Clicks a button

Then Show form 1

Thanks, I hope it makes enough sense.

The code I tried was


Public Class Form2
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If ComboBox1.SelectedText.ToString() = "1" And ComboBox2.SelectedText.ToString() = "a" And ComboBox3.SelectedText.ToString() = "A" Then
Then
Form1.Show()
Else
MsgBox("Doesn't Work")

End If
End Sub
End Class



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: If ComboBox equals an item on the list then do this?

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×