Results 1 to 2 of 2

Thread: Simple Two Lists RESOLVED

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2005
    Posts
    300

    Simple Two Lists RESOLVED

    I have 3 ListBoxes.

    List1 has A-Z
    List2 has A-Z

    but i want list3 contain all possible combinations.

    so i need to it to take the first letters in list1 being A, then go al the way down list2 adding the letter from list2 to the letter in list1.

    So i would end up with

    AA
    AB
    AC
    AD
    AE
    AF
    AG etc

    BA
    BB
    BC
    BD
    BE
    BF
    BG etc

    CA
    CB
    CC
    CD etc

    you get the picture i hope.

    But it has to use the values loaded in the listboxes using A-Z as an example i wana be able to load differnt words.
    Last edited by Ricky1; Dec 13th, 2005 at 08:42 PM.
    Im Learning !!!!

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Simple Two Lists

    VB Code:
    1. Dim i1 As Integer, i2 As Integer
    2. For i1 = 0 To List1.ListCount - 1
    3.     For i2 = 0 To List2.ListCount - 1
    4.         List3.AddItem List1.List(i1) & List2.List(i2)
    5.     Next
    6. Next

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