Randomization

To generate random numbers you must use the Rnd pre-defined function.

To make sure that the program generates a different set of pseudo-random numbers each time you use it, you must also use the Randomize function.

Example VB code – random number from 1 to 10     show
Example VB code – random choice     show
Generate your own VB code:
Lowest possible value:
Highest possible value:

Whole numbers

Back to index

mph@ghscomputing.co.uk

Updated 09 December 2018