PDA

Click to See Complete Forum and Search --> : Adding 2 list box items


KatDaddy
Nov 8th, 1999, 12:32 AM
How do I add the data list box A items into
list box B items and then place the result in list box 3?

The following is what I want to perform

listbox3 = listbox2 + listbox1

Thanks for any information

smalig
Nov 8th, 1999, 01:06 AM
lc = ListBox1.ListCount-1
For lx = 0 To lc
List3.AddItem ListBox1.List(lx)
Next
lc = ListBox2.ListCount-1
For lx = 0 To lc
List3.AddItem ListBox2.List(lx)
Next

------------------
smalig
smalig@hotmail.com
smalig.tripod.com (http://smalig.tripod.com)

MartinLiss
Nov 8th, 1999, 02:32 AM
For a small list it doesn't matter, but if the lists are large you should modify the Next statements in smalig's post to be Next lx. You will find that the latter is slightly faster.

------------------
Marty