Dim i As Integer
For i = 0 To List1.ListCount - 1
List1.ListIndex = i
If List1.Text = txtsearch.Text Then
MsgBox " يافت شد" & i, vbInformation + vbOKOnly, "founded"
Exit Sub
End If
Next i
MsgBox " يافت نشد", vbExclamation + vbOKOnly, "not founded"
Dim i As Integer
For i = 0 To List1.ListCount - 1
List1.ListIndex = i
If List1.Text = txtsearch.Text Then
MsgBox " يافت شد" & i, vbInformation + vbOKOnly, "founded"
Exit Sub
End If
Next i
MsgBox " يافت نشد", vbExclamation + vbOKOnly, "not founded"