Results 1 to 5 of 5

Thread: [RESOLVED] Sort Listbox Additem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    105

    Resolved [RESOLVED] Sort Listbox Additem

    Ok i am trying to add 3 things to a listbox after a button is clicked but when they are loaded into the lisbox...

    they appear as text1text2text3

    id like to make it appear like this:

    Code:
    Listbox
    Username: text1
    New Password:text 2
    Old Password: text 3
    Plz help me, tyvm

  2. #2
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    1,023

    Re: Sort Listbox Additem

    With List1

    .AddItem "Username: "+Text1.Text + vbCrLf
    .AddItem "New Password: "+Text2.Text + vbCrLf
    .AddItem "Old Password: "+Text3.Text + vbCrLf

    End With

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    105

    Re: Sort Listbox Additem

    thanks Justa_Lol ... could u also tell me how i could add it like this plz

    Code:
    --------------------
    Username: Text1
    New Password: Text2
    Old Password: Text3
    --------------------

  4. #4
    Fanatic Member
    Join Date
    Jun 2008
    Posts
    1,023

    Re: Sort Listbox Additem

    do you mean like

    With List1

    .AddItem "--------------------" + vbCrLf
    .AddItem "Username: "+Text1.Text + vbCrLf
    .AddItem "New Password: "+Text2.Text + vbCrLf
    .AddItem "Old Password: "+Text3.Text + vbCrLf
    .AddItem "--------------------" + vbCrLf

    End With


    or make the string only text1, 2, 3 not the text thats on the textbox?

    vbCrLf makes the new line... so if you want a new line just add + vbCrLf

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    105

    Re: Sort Listbox Additem

    yep i got it figured lol ... thanks Justa

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