Results 1 to 3 of 3

Thread: Listbox items into a label box. Help me! Hurry.

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Karhula, Finland
    Posts
    4

    Post

    How can I get the list items into a label boxes? I have 20 Label boxes (label1(0) Label1(1) etc...) and a list box.
    Now I need to get list items into a label box, so that item 1 goes to label1(0), item 2 goes to label1(1) etc...

    How can I do this

    Thank you!

  2. #2
    New Member
    Join Date
    Jan 2000
    Location
    Ireland
    Posts
    15

    Post

    I haven't used label boxes but I have done alot of transfers between list boxes.
    You can access the items in your list box in a while loop
    should be able to do:

    dim count as integer
    count = 0
    while count < n do
    item_val = label1(count)
    list1.additem(item_val)
    count = count + 1
    loop


    Hope that helps.

  3. #3
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    this is a little shorter:
    For i = 0 To List1.ListCount - 1
    Label1(i).Caption = List1.List(i)
    Next i

    ------------------
    Razzle
    ICQ#: 31429438

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