Hello all,
I have a listbox with 2 'fields' and a choice of 100 or so items that
can be selected.
User can select multiple items (i'm using the simple multiitem model) as
normal.
however, I want several buttons that will select a set of these items if
pressed.
the pseudo code i would use is as follows, but I don't know the VBA to
use - any help appreciated.
eg:
listbox name: SourceList
2 columns: Source_ID and Description
100+ different Source_ID's in the list
list1 has 10 Source_ID's in it
list2 has a different 10 etc
pseudo code:
for each item in the listbox
if the item value is in list1 (or list2 etc)
then make that item 'selected'
else leave it unselected
next
I can CLEAR a listbox no problem using the code:
For Each varItem In SourceList.ItemsSelected
SourceList.Selected(varItem) = False
Next varItem
and I understand how that works, but I cant figure out how to do it the
other way round...
any help appreciated.
andy warner
*** Sent via Developersdex
http://www.developersdex.com ***