Discussion:
Initial ramdom seed number?
(too old to reply)
JJ
2023-01-31 05:35:43 UTC
Permalink
Does anyone know the number to be used with `randomize` to set the random
seed which is same as the predefined initial random seed?

e.g. with below code...

'start of code. no other code exist before this line
a = rnd
b = rnd

The `a` variable would always contain `0.7055475`, and `b` would aways
contain `0.533424`. Whether it's VB6, VBA (Office), or VBScript. And
regardless of OS edition and versions. e.g. WinME, WinXP, Win7; all produce
the same result.

I know that, setting a random seed must be done by first calling `rnd(-1)`
then executing `randomize` with a specific number. But what number to use to
match with the predefined initial random seed?
JJ
2023-01-31 05:38:00 UTC
Permalink
Post by JJ
Whether it's VB6, VBA (Office), or VBScript.
Excluding .NET crap's VB.NET.

Loading...