TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Steven Sandford
NA
18
5.6k
Check if 2 listboxes have selected items
Oct 7 2014 10:28 PM
Hi Guys,
Fairly new to
VB
but enjoying making a small app. One thing I am stuck on is trying to check if 2 listboxes have had an item selected.
If the 2 listboxes have an item selected then enable a button.
I have placed the following code inside the Listbox1 Click Event sub which is public.
If listbox1.selectedIndex => 0 And listbox2.selectedIndex => 0 Then
button1.enabled = True
End If
Now this seems to enable my button only if an item is selected in listbox2 and then you need to click twice within listbox1 before it recognises the selection.
I have pieced this together just from google so if I am doing it wrong I would like to know the correct format or the most sound approach.
Thank you
Reply
Answers (
2
)
Falling Distance
linking two webfom in asp.net