Try This ..
VB Code:
Public Function FindString(partial As String, Kontrol As ComboBox) As String
Dim i As Integer
For i = 0 To Kontrol.ListCount
If partial = UCase(Mid(Kontrol.List(i), 1, Len(partial))) Then
FindString = Right(Kontrol.List(i), Len(Kontrol.List(i)) - Len(partial))
End If
Next
End Function
Public Sub autocomplete(Kontrol As ComboBox, KeyAscii As Integer)
Dim Data As String
Dim Dapat As String
If Kontrol.Text <> "" Then Data = Mid(Kontrol.Text, 1, Kontrol.SelStart)
If Kontrol.SelLength = Len(Kontrol.Text) Then Kontrol.Text = ""
If KeyAscii <> 13 And KeyAscii <> vbKeyBack Then
Data = CStr(Data) + Chr(KeyAscii)
Else
If KeyAscii = vbKeyBack And Data <> "" Then
Data = Mid(Data, 1, Len(Data) - 1)
Else
Exit Sub
End If
End If
Dapat = FindString(UCase$(Data), Kontrol)
Kontrol.Text = Data
Kontrol.SelStart = Len(Data)
Kontrol.SelText = Dapat
Kontrol.SelStart = Len(Data)
Kontrol.SelLength = (Len(Kontrol.Text) - Len(Data)) + 1
End Sub
Private Sub Combo1_KeyPress(KeyAscii As Integer)
autocomplete Combo1, KeyAscii
KeyAscii = 0
End Sub