Code:
Option Explicit
Private Declare Function sendMessageByString& Lib "user32" _
    Alias "SendMessageA" (ByVal hwnd As Long, _
    ByVal wMsg As Long, ByVal wParam As Long, _
    ByVal lParam As String)

Private Sub Command1_Click()
 Dim lngEntryNum As Long
 Dim strTxtToFind As String
   
    lngEntryNum = sendMessageByString(List1.hwnd, &H18C, 0, "abc")

End Sub

Private Sub Form_Load()
    List1.AddItem "abc"
    List1.AddItem "abcd"
    List1.AddItem "abcd d"
    List1.AddItem "abdd e"
    List1.AddItem "abd"
    List1.AddItem "abdec"
End Sub
when I use this code, he selects the second line, instead of the first. Why???