I have a listbox enabled for me to select as many items in the list as I need (MultiSelect = 1). I then have various button that cary our diferent tasks on the selected items in the listbox.
If any of these buttons are clicked I now want to return a message box saying "No Team selected" if no items in the list are selected.
This almost works: If ListBox1Table.ListIndex = 0 Then MsgBox "No Team selected".
The only problem is for the first item in the list being 0. If this is the only item in the list selected I still get the message box "No Team selected"!
Am I on the right lines with my coding or do I need to do something totally different to overcome this problem?
Many thanks
Pete
If any of these buttons are clicked I now want to return a message box saying "No Team selected" if no items in the list are selected.
This almost works: If ListBox1Table.ListIndex = 0 Then MsgBox "No Team selected".
The only problem is for the first item in the list being 0. If this is the only item in the list selected I still get the message box "No Team selected"!
Am I on the right lines with my coding or do I need to do something totally different to overcome this problem?
Many thanks
Pete