Hello,
I'm using Excel 2007 on Win XP.
I would like to be able to repeat a sequence of random numbers generated using rnd debug/ repeat scenarios in a model I am building.
Currently, I am using the following to set the seed to try and accomplish this (via a Sub that I call from a button form to "restart" the random number generation from the beginning)
Rnd (-1)
Randomize (10)
This works nicely enough until I close excel and reopen it again. The next time I run this code the list of random numbers produced is different from the previous instance of excel. However, it will be consistent until I close excel and reopen it again.
Would appreciate any ideas on what I might be doing wrong.
Thank you,
Han-Ron
I'm using Excel 2007 on Win XP.
I would like to be able to repeat a sequence of random numbers generated using rnd debug/ repeat scenarios in a model I am building.
Currently, I am using the following to set the seed to try and accomplish this (via a Sub that I call from a button form to "restart" the random number generation from the beginning)
Rnd (-1)
Randomize (10)
This works nicely enough until I close excel and reopen it again. The next time I run this code the list of random numbers produced is different from the previous instance of excel. However, it will be consistent until I close excel and reopen it again.
Would appreciate any ideas on what I might be doing wrong.
Thank you,
Han-Ron