I need to check whether or not an item in my list box is selected. So basically if it is then MsgBox ("Action 1") and if it isnt ("Actions 2")
Printable View
I need to check whether or not an item in my list box is selected. So basically if it is then MsgBox ("Action 1") and if it isnt ("Actions 2")
check the list1.ListIndex property it will return -1 if nothing is selected else it will return the selected item index.
Thanks;)
VB Code:
If ListBox1.ListIndex = -1 Then MsgBox "Growly Sausages" Else MsgBox "Fishy woof woof's" End if
Woof
What the heck is a fishy woof woof?!:lol: