A Good ListBox Seach function
This code searches a listbox for a given string, and returns the the ListIndex of the Item that matches the given string.
AI
AI 摘要: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
源代码
Private Function SearchList(ToSearch As String, lstList As ListBox) As Integer Dim i As Integer SearchList = -1 For i = 0 To lstList.ListCount - 1 If LCase(lstList.List(i)) = LCase(ToSearch) Then SearchList = i Exit For End If Next i End Function
原始评论 (3)
从 Wayback Machine 恢复