how do u get each line speratly into a combo box

if i got text file like this

whatever......,$300
same here..., 300

i tried this the code
Do Until EOF(1)
LineOfProduct = LineInput(1)
AllProducts = AllProducts & LineOfProduct & vbCrLf
Loop
cobProduct.Items.Add(AllProducts)

basically ,it keeps putting them in one gaint line in the combo box

please help!

Comments

  • : if i got text file like this
    :
    : whatever......,$300
    : same here..., 300
    :
    : i tried this the code
    : Do Until EOF(1)
    : LineOfProduct = LineInput(1)
    : AllProducts = AllProducts & LineOfProduct & vbCrLf
    : Loop
    : cobProduct.Items.Add(AllProducts)
    :
    : basically ,it keeps putting them in one gaint line in the combo box
    :
    : please help!
    :

    Move the cobProduct.Items.Add(AllProducts) inside the loop.

    -Fallen

  • ok i did that ,now there are 21 lines of products which is excuatly what i have, but all the items still in one long line and each line is the same as the prevoius one
    so i have line 1 up to line 21 like this:

    tomato, potato,...line 1
    .
    :
    :
    tomato,potato...line 21

    and also i included a text box with same fuctions of comboBox to display the text file and it worked
    so it must be a properity thing to get the combo box working, but i can't seem to find it!!
    also, how do u get to sparate a string into 2 and display each in a list box
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories