Please Help- Newbie

[b][red]This message was edited by Gavlester at 2002-9-20 4:6:42[/red][/b][hr]
Howdy all. I have only just started coding and basically what i need is a way to create 8 different RANDOM numbers without a number being repeated.

I am able to create the Random numbers (Simple enough) but i cannot make it so that the numbers aren't repeated.

Your help would be most appreciated.

Can you please send any assistance to


  • Alright, I can help...

    Dim x(1 To 8)
    Dim n, b

    For n = 1 to 8
    Randomize Timer
    x(n) = Int(Rnd * 100) + 1
    For b = 8 to 1 Step -1
    If x(n) = x(b) Then Goto Retry
    Next b
    Next n

    Don't complain if it doesn't work, I just thought of that off the top of my head, but it should work, and if it doesn't, then it gives you grounds for how to do it. If you really do need me to do it, then e-mail me at and I'll make a program and write out the source code which will tell you how to do it.

    ..:: Zantos ::..
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion