Find ListIndex of an item in a Combo/List box without iterating through the list
Find ListIndex of an item in a Combo/List box without iterating through the list
API Declarations
Const CB_FINDSTRING = &H14C
Rate Find ListIndex of an item in a Combo/List box without iterating through the list
(1(1 Vote))
findIt= "....Your string goes here..." 'whatever string you are looking for
i = SendMessage(cboCust(0).hWnd, CB_FINDSTRING, -1, ByVal findIt)
If i > -1 Then cboCust(0).ListIndex = i
'note the string must be passed ByVal and cannot be a reference (e.g to a field
'in a recordset etc...)
'Returns -1 if not found
Find ListIndex of an item in a Combo/List box without iterating through the list Comments
No comments yet — be the first to post one!
Post a Comment