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
button1.enabled = True
End If
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

VulpesRank #55 · 29.2K reputationPosted Oct 8, 2014, 3:58 AM EDT
Notice also that the 'greater than or equal' operator should be written the other way around i.e. >= instead of =>.
Steven Sandford18 reputationPosted Oct 8, 2014, 1:11 PM EDT
Thanks Vulpes, I managed to get this working with a little help
I created a single method with the above code, and then passed the method through both event handlers