Move Items Between List Boxes
Posted by JAF on July 27, 2000 4:26 AM
I have a List Box (imaginatively called ListBox1), which is populated with specific data when one of 7 option buttons is selected.
What I want to be able to do is to have a CommandButton which moves from ListBox1 (which contains ALL valid entries relating to whichever option button is selected) to ListBox2 those entries highlighted by the user.
For instance: ListBox1 may contain "Pool 1", "Pool 2", "Pool 3", "Pool 4" & "Pool 5", but if the users only selects "Pool 1" and "Pool 4", I want just those entries added to ListBox2.
I was given some code to do this (ListBox2.AddItem ListBox1.Value), but this generates the following error message:
Run Time Error '-2147352571 (80020005)':
Type Mismatch
Any suggestions?