How do i randomly select an item from a listbox and make it appear in text1.
Printable View
How do i randomly select an item from a listbox and make it appear in text1.
Text1.Text = List1.List(Int((List1.Listcount) * Rnd))
I think that's correct but I haven't tested it.
worked great thank you.
You're welcome. Don't forget to use Randomize or you'll get the same results each time you run the program.
hmmm its not very random tho. Because everytime i load the program its always the samething that appears first.
I assume you missed my previous post :)
how do i use Randomize ?
VB Code:
Private Sub Form_Load() Randomize End Sub
sorted thanks alot.