>Hi
>I want to remove several items in the Listbox by the column which have same value
>, for example, I wan to remove all items in the Listbox which column 2's value are equal to "01"
>the code as follow,
>
>
>FOR x = 1 TO thisform.List1.ListCount
> IF thisform.List1.List[x,2]=="01"
> thisform.List1.RemoveItem(x)
> ENDIF
>NEXT x
>
>
>But I find that it not work.
>Please advise.
>Derek
You must reverse the For-Next-loop. For X=thisform.List1.ListCoun to 1 step -1