First up, don't use Randomize and Rnd to generate random numbers. Create a Random object and then call its Next method.

As for the question, see this CodeBank thread of mine.