| 'Function: Completes a word by searching through a specified listbox 'will skip as many matches as the number you type in for Skip Public Function AutoComplete(Word as String, List as ListBox, Skip as Integer) as String Dim I as Integer Dim J as Integer Dim SkipAmount as Integer SkipAmount = Skip For I = 1 to Len(Word) For J = 0 to List.ListCount - 1 If UCase(Left(Word,1) = UCase(List.List(J)) Then If SkipAmount > 0 then SkipAmount = SkipAmount - 1 Else AutoComplete = List.List(I) Exit Function End if End If Next Next End Function |
AutoComplete Code |
Express News India | Freelance ecommerce web development India