How to generate a random number, in between two given values.
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 | 'Math - How to generate a random number, in between two given values. 'S = smallest number that it could return 'L = largest number that it could return Option Explicit Private Function Random(ByVal S As Long, ByVal L As Long) As Long Random = CLng(Rnd * (L - S + 1)) + S) End Function |
Related posts:
- How to generate Random Lotto Numbers
- How to generate random numbers, with the info
- How to return the smallest parameter value.
- How to return the biggest parameter value.
- How to Generate a standard windows About box
- Visual Basic 2008 – Random Number Generator
- How to generate list in combobox with all dates of current month
- How to sort a list of random numbers in List box at run time
- How to use InputBox function and get values
- How to find the receprocal of a given number