Jay Petrulis <jpetrulis@lycosmail.com> wrote...
....
>I have one question, for Harlan in particular, about his
>code. Could it be improved (made "more random") if
>
>Randomize
>
>is used to initialize the RNG and was included before the
>VBA Rnd function is invoked, so that the "seed" is
>reshuffled? Was/is it unnecessary in this instance?
....
It never hurts. Just because I didn't include it doesn't mean I had a reason
not to include it other than simply forgetting to do so.
Note: all Rnd calls in all VBA procedures use the same pseudorandom number
generator, so it's only necessary to call Randomize once in any Excel
session (though I guess it might be necessary to call it in each additional
Excel application instance if using multiple Excel sessions - dunno whether
the state variables are stored in shared DLL memory space or in each
application instance's own memory space). I call Randomize in Worksheet_Open
in my Personal.xls file, so I never think of adding it elsewhere.