Hey all,
I'm trying to make a simple procedure that will check if any items in a given listbox have been selected and if so, continue, otherwise give an error. Here's what I've got:
With i dimmed as a variant.
The problem is that it won't recognise any of the list rows being selected except the first. If the first is selected, it continues as normal.
I'm trying to make a simple procedure that will check if any items in a given listbox have been selected and if so, continue, otherwise give an error. Here's what I've got:
Code:
For i = 0 To lstChannel.ListCount - 1
If lstChannel.Selected(i) Then
Exit For
Else
MsgBox "Channel must be selected"
Exit Sub
End If
Next i
With i dimmed as a variant.
The problem is that it won't recognise any of the list rows being selected except the first. If the first is selected, it continues as normal.