|
-
Nov 4th, 2000, 05:27 PM
#1
Thread Starter
Lively Member
I'm almost on the verge of figuring this out ... but, I could use some help (please). My brain is fried ... this is the extent of my Basic thinking abilities (kinda sad I guess)
Thanks for any help!
Dim ListCount As Integer
Dim Store_Old_List()
Dim Store_New_List_Count()
Dim MyRandom As Integer
ListCount = Listbox.ListCount
For X = 1 to ListCount
Store_Old_List(X) = Listbox.list(x-1)
Next
'Old list is stored
For Y = 1 to ListCount
Loop:
Randomize
MyRandom = Int((ListCount * Rnd) + 1)
For X = 1 to Y
If MyRandom = New_List_Count(X) Then
Goto Loop 'random number already stored
End If
Next
New_List_Count(Y) = MyRandom
Next
For X = 1 To ListCount
ListBox.RemoveItem 0
Next 'Clear the listbox
For X = 1 To ListCount
Listbox.additem Store_Old_list(New_List_Count(X))
Next
The_End:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|