Results 1 to 3 of 3

Thread: Adding 2 list box items

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 1999
    Posts
    2

    Post

    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

  2. #2
    Addicted Member
    Join Date
    Oct 1999
    Posts
    232

    Post

    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
    [email protected]
    smalig.tripod.com

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width