Hello everyone!
I have a front-end/back-end application.
I want a front-end to compact the back-end each morning.
Obviously the front end which will do the job must stop other front-ends from proceeding.
I figure there's some chance of two front-ends trying at exactly the same time.
So I'm thinking I'll generate a large random number and let the front-end with say the biggest number proceed if there are two or more.
So my question for very clever mathematicians is: what are the odds of the code below returning the same number from say 10 front-ends please? -
Code:
Public Function sngNumber() As Single
Randomize
sngNumber = 2000001 * Rnd + 1000000
End Function