I might have missed this, but is there a way to specify a seed value to the rnd() function so that the same pseudo-random sequence is generated each time?
Sub Globals
'Declare the global variables here.
End Sub
Sub App_Start
Random.New1(False)
Seed.New1(1)
Seed.SetValue(0,75,"System.Int32") 'Set the seed value
Random.CreateNew2("System.Random",Seed.Value)
Msgbox(MyRnd(0,10))
Msgbox(MyRnd(0,10))
End Sub
Sub MyRnd(Minimum, Maximum)
Return Random.RunMethod3("Next",Minimum,"System.Int32",Maximum,"System.Int32")
End Sub
AF0="A1B2C3D4E5F67890"
n=""
For i = 0 To 64
n=n&StrAt(AF0,Random.RunMethod3("Next",0,"System.Int32",StrLength(AF0),"System.Int32"))
Next
That's a good idea! Why not take it a bit further and generate the characters directly? In this case printable ASCII ones. As an aside why 65 characters in n?That helps me create a password for the crypto question that agraham helped me with.
n=""
For i = 0 To 64
n=n&Chr(Random.RunMethod3("Next", 33, "System.Int32", 127, "System.Int32")))
Next