PRB: Same Seed for Randomize Does Not Repeat Previous SequenceLast reviewed: October 30, 1995Article ID: Q129742 |
The information in this article applies to:
SYMPTOMSWhen you use the Randomize function with the same value for the seed number, the function does not repeat the previous sequence.
WORKAROUNDTo repeat sequences of random numbers, call the Rnd function with a negative argument immediately before using Randomize with a numeric argument.
STATUSThis behavior is by design.
MORE INFORMATIONThe Randomize function uses the number specified as its parameter to initialize the Rnd function's random-number generator, giving it a new seed value. This implies that if Randomize is called with the same seed number, it should reinitalize Rnd, so that subsequent calls will generate the same pattern of numbers.
Steps to Reproduce Behavior
|
Additional reference words: 3.00 4.00 vb4win vb4all
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |