PDA

Click to See Complete Forum and Search --> : Random in a listbox


Matt-D
Jan 22nd, 2000, 07:18 PM
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 ;)

Jan 22nd, 2000, 09:03 PM
randomize
MyRand = int(4 * rnd)
me.print list1.list(Myrand)

itay222
Jan 23rd, 2000, 11:57 AM
a little more accurate:

rnd*(list.ListCount)

but it's just as easy.