How to generate numbers in vb randomly
Please tell me how to generate numbers in vb in random order. I am using the 2008 version of vb. I want to create random numbers for making client numbers. How can I do this?
Please tell me how to generate numbers in vb in random order. I am using the 2008 version of vb. I want to create random numbers for making client numbers. How can I do this?
Â
Hi Heather Carr,
Rnd Function
Every time the Rnd function is used, a novel pseudo-random value is revisit. The values returned are constantly less than one (1), but greater than or equal to zero (0). That is to state, VB produces random numbers which may be as low as zero (0), but will never attain the value of one (1).Â
0 = Rnd 1
The values in that series may not appear very helpful but there's an easy formula for exchange the values returned by Rnd into a more useful range:Â
Int((HighestValue – LowestValue + 1) * Rnd) + LowestValue
Initiate a function that summarizes this formula will aid abridge the generation of pseudo-random values.Â
Thanks
Â