Can anyone please translate this to Classic VB(5)
And can somebody perhaps explain what the 'Do While Array.IndexOf(lotto, j) > -1' part does (I know that the purpose of the code is to give unique values to the variables in the array, but I don't know what it 'does' more precisely). Thanks a lotVB Code:
Public Sub slumpa() j = Int(35 * Rnd() + 1) For i = 0 To 6 Do While Array.IndexOf(lotto, j) > -1 j = Int(35 * Rnd() + 1) Loop lotto(i) = j Next i




Reply With Quote