' note that the 'byval' ssearchtext' is important
' if you use SendMessageAny ' Public Function ListBoxIndex(ByVal lHwnd As Long, ByVal sSearchText As String) As Long ListBoxIndex = SendMessageAny(lHwnd, LB_FINDSTRING, -1, ByVal sSearchText) End Function |