Results 1 to 3 of 3

Thread: Random in a listbox

  1. #1

    Thread Starter
    Hyperactive Member Matt-D's Avatar
    Join Date
    Nov 1999
    Location
    Mettmann, Germany
    Posts
    305

    Post

    There's a listbox filled by the AddItem method with 2 or 3 or 4 items (the nuber changes).
    Now I want that a random chooses one item from the list.

    Is this possible in VB3 ?

    Thx for some help, Matt

  2. #2
    Guest

    Post

    Code:
    randomize
    MyRand = int(4 * rnd)
    me.print list1.list(Myrand)

  3. #3
    Lively Member
    Join Date
    Jan 2000
    Posts
    102

    Post

    a little more accurate:

    rnd*(list.ListCount)

    but it's just as easy.

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