Good morning, how can I autocomplete column 2 Name which is text,
this code is only valid for autocomplete the index
Posted by Andrew G
Image may be NSFW.
Clik here to view.
TnX
this code is only valid for autocomplete the index
Posted by Andrew G
Code:
Dim DelKey As Boolean
Private Sub Text1_Change()
On Error GoTo ErrMsg
Dim LstItm As ListItem
ListView1.FindItem(Text1.Text, , , 1).Selected = True
If Not DelKey Then
'If something was chosen then we get the rest of it
strt = Len(Text1.Text)
Text1.Text = ListView1.SelectedItem.Text
Text1.SelStart = strt
Text1.SelLength = Len(Text1.Text) - strt
End If
DelKey = False
Exit Sub
ErrMsg:
ListView1.SelectedItem.Selected = False
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDelete Or KeyCode = 8 Then DelKey = True
End Sub
Clik here to view.

TnX