Hi,
Well the ways suggesteddo work if you want a REALLY SLOW app', but if u want Performance this is the definative way to go!!!


Private Sub URLListCombo_Change()

Dim i As Long, j As Long
Dim strPartial As String, strTotal As String

'Prevent processing as a result of changes from code
If m_bEditFromCode Then
m_bEditFromCode = False
Exit Sub
End If

With URLListCombo
'Lookup list item matching text so far
strPartial = .Text
i = SendMessage(.hwnd, CB_FINDSTRING, -1, ByVal strPartial)
'If match found, append unmatched characters
If i <> CB_ERR Then
'Get full text of matching list item
strTotal = .List(i)
'Compute number of unmatched characters
j = Len(strTotal) - Len(strPartial)
'
If j <> 0 Then
'Append unmatched characters to string
m_bEditFromCode = True
.SelText = Right$(strTotal, j)
'Select unmatched characters
.SelStart = Len(strPartial)
.SelLength = j
Else

'*** Text box string exactly matches list item ***

'Note: The ListIndex is still -1. If you want to
'force the ListIndex to the matching item in the
'list, uncomment the following line. Note that
'PostMessage is required because Windows sets the
'ListIndex back to -1 once the Change event returns.
'Also note that the following line causes Windows to
'select the entire text, which interferes if the
'user wants to type additional characters.
' PostMessage Combo1.hwnd, CB_SETCURSEL, i, 0
End If
Else
bNewURLEntered = True
End If
End With

End Sub


Mail me if u need an entire sample app i wrote, its something like the Address bar in IE, that looks ahead as u type in your stuff to auto complete. The logic to look for a string is the same.

Hope this helps, Cheers
------------------
Gaurav Mahindra
[email protected]




[This message has been edited by Gaurav (edited 11-26-1999).]