nd1marcello
Board Regular
- Joined
- Jun 1, 2012
- Messages
- 228
Hi all,
I am trying to create a MsgBox that alerts a user when nothing was selected in ListBox5. It is a multiselect listbox. What do I need to tweak here?
I am trying to create a MsgBox that alerts a user when nothing was selected in ListBox5. It is a multiselect listbox. What do I need to tweak here?
Code:
If ListBox5.ListCount = -1 Then
MsgBox "Missing query selection." & vbNewLine & vbNewLine & "Please make a RETAILER selection.", vbOKOnly, "Attention!"
Exit Sub
End If