Results 1 to 2 of 2

Thread: ListBox

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2001
    Posts
    759

    ListBox

    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

  2. #2
    Addicted Member stevess's Avatar
    Join Date
    May 2001
    Posts
    251
    ListCount will be 0 if nothing was added, not -1 (that's ListIndex)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width