View Full Version : Unselecting listbox items


spinkung
02-21-2008, 01:10 AM
Hi all,

I have 2 listboxes. One is populated when the form loads, then 2nd is popilated by selecting items in the first and clicking an 'ADD' button.

When i click the ADD button everything works fine except i want to unselect the items i've added from the first list box after clicking ADD.

something like : listbox1.items.unselect

Does anyone know how to do it??

Thanks.

DCrake
02-21-2008, 06:00 AM
Try this

For x = 0 to me.listbox.listcount -1

me.listobx.selected(x) = False

Next

In short it loops through all the items items in the list box and sets the selected mode to False

CodeMaster::cool:http://www.icraftlimited.co.uk

spinkung
02-21-2008, 07:02 AM
Excellent, that works fine.

Many Thanks.