oh ha! we are on same frequency @PhilOfPerth !
Here is some code i was fixing this morning for Carlos who likes his numbers in order
more efficient? depends is always a safe answer for shuffling a deck, Fisher Yates is the best according to Wiki on subject but the method you understand the best and can use properly is pretty good too, a B+
Here is some code i was fixing this morning for Carlos who likes his numbers in order
Code: (Select All)
Randomize Timer
For times = 1 To 20 ' do this 20 times
ReDim NUMEROS(1 To 25) ' reset all to zero
For j = 1 To 15
tryAgain:
temp = Int(Rnd * 25) + 1 ' random from 1 to 25 inclusive
If NUMEROS(temp) Then GoTo tryAgain Else NUMEROS(temp) = 1 ' if already have try again for this time
Next
For i = 1 To 25 ' see what we got in order
If NUMEROS(i) Then Print i;
Next
Print
Next
more efficient? depends is always a safe answer for shuffling a deck, Fisher Yates is the best according to Wiki on subject but the method you understand the best and can use properly is pretty good too, a B+
b = b + ...