Hi,
I am trying to generate a list of random numbers from a string array, but it keeps giving me repetitions in some instances. How do i prevent the array from generating the same random number twice?
Thanks. here is what i used and didn't work.
Dim namesArray() As String = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j"}
Dim intRandom As Integer = Int(Rnd() * 10 + 1)
Return namesArray(intRandom - 1)
|