troubleshooting Question

What is the best way to find a variable in a string from a ListBox?

Avatar of Richard Comito
Richard ComitoFlag for United States of America asked on
Visual Basic.NET
13 Comments2 Solutions349 ViewsLast Modified:
I have a ListBox that can have multiple selection.  I would like to be able to check and see if a number is selected.  When I select one a time the bottom code works.  But when I have more then one selected it does not work.  How can I change this code to work no matter what is selected.

Thanks



        If Me.lbDBRecipients.SelectedValue = 2 Then
            Me.lbVotingSeason.Enabled = True
            Me.lblVotingSeason.Enabled = True
            Me.lbMemberStatus.Enabled = True
            Me.lblMemberStatus.Enabled = True
        End If
ASKER CERTIFIED SOLUTION
YoungBonzi

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros