try thischange the control names to suit your requirementVB Code:
Dim iPos As Integer For i = 0 To List1.ListCount - 1 iPos = InStr(1, List1.List(i), txtText1.Text) If Trim(txtText1.Text) = "" Then Exit For If iPos > 0 Then txtText1.Text = Mid(txtText1.Text, 1, iPos - 1) & Mid(txtText1.Text, iPos + Len(List1.List(i))) List1.RemoveItem (i) End If iPos = 0 Next





Reply With Quote