Need help adding info from listboxes into combo boxes

Discussion in 'Programming General' started by fury6000, Apr 26, 2009.

Need help adding info from listboxes into combo boxes
  1. Unread #1 - Apr 26, 2009 at 6:03 PM
  2. fury6000
    Joined:
    Jan 21, 2008
    Posts:
    34
    Referrals:
    0
    Sythe Gold:
    0

    fury6000 Member

    Need help adding info from listboxes into combo boxes

    Ok so im working on a program where the user enters something into a textbox and it appears in a listbox. good that works, but now the next part is that the user hits the continue button, and on the next form there is a combo box and i want the info from the listboxes from the previous form in the combo box. I made it into an array but its not workin. help would be appreciated :cool:
     
  3. Unread #2 - Apr 26, 2009 at 10:54 PM
  4. jdsfighter
    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0

    jdsfighter Forum Addict
    Visual Basic Programmers

    Need help adding info from listboxes into combo boxes

    Is this sufficient?

    Code:
    Private Sub Command1_Click()
    Form2.Show
    For i=0 to List1.Listcount-1
    Form2.Combo1.Additem list1.list(i)
    next
    end sub
     
  5. Unread #3 - May 5, 2009 at 1:39 PM
  6. MasonSoiza
    Joined:
    May 5, 2009
    Posts:
    0
    Referrals:
    0
    Sythe Gold:
    0

    MasonSoiza Newcomer

    Need help adding info from listboxes into combo boxes

    this is better:

    sub AddToCombo
    dim i as integer
    i = 0 to list1.listcount
    combo1.additem list1.list(i)
    next i
    End sub
     
< [Tutorial] Multi-Threading | [VB.Net] How Can I Mute My App? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site