Hi Everyone,

How can I get a ListBox to display a message if no data appears in it? This is being used for a search function. If no matches are found I want the message to reflect that. Any help would be appreciated. Thank you. This is what I have tried.

Code:
     If lstResults.ListCount = -1 Then
          MsgBox "No Matches were found.  Please try again."
     End If