I originally was given 10 forms, each with 4 songs, to be played in random order (no repeats) and decided, for time and sanity sake to duplicate the forms. Now I have 40 forms to be presented randomly. The challenge for me is the first time the forms are called, they come from one location, the remaining 39 times come from another location.
On a recommendation, I used
Code:
Private Sub cmdNext_Click()
Dim adu As String
adu = Rand(1, 40)
Select Case adu
Case 1
frm1.Show
Case 2
frm2.Show
Case 3
frm2.Show
Case 4
frm4.Show
etc..
Case 40
frm40.Show
with the Rand function. However, I am getting duplicates (obviously) and wonder if anyone can offer a better option or modification I can make. I am not a programmer by trade, just by necessity. Would it be better to use flags?