FindString Method
Object List Next Object
Defined By: ListBox
Description:
Locates the requested string prefix in the ListBox.
Declaration:
Function FindString(ByVal itemPrefix As String, ByVal startIndex As Integer) As Integer
Details:
FindString will begin a search at the entry one position after the requested entry, and scan the beginning of each entry for the requested
prefix. If startIndex is -1, the search will begin from the top of the list. If the search reaches
the end of the list, it will return to the top and resume its search there. The
search is not case-sensitive (i.e. a search for “env”, “Env” or “ENV” will all find an entry beginning with the letters “env” in any state of capitalization). FindString will either return the index of
the first item having the appropriate prefix, or -1 if the prefix cannot be
found. A -1 will only be returned if the requested prefix cannot be found anywhere in the list, regardless of the startIndex.