How about this?
Public Function NewJobSerial() As Long
NewJobSerial = CType((Format$(Int(Rnd() * 424) - 212)) + _
Format$((Now.Millisecond * 100), "0000000"), Long)
Return NewJobSerial Xor CType(2147483647 * Rnd(), Integer)
End Function
"Starbuck" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> Simply because the challenge is there I am trying to convert my vb6 code
> to vb.net. In the most part I have found ways but here is one I am stuck
> on, so any thoughts would be welcome.
>
> Public Function NewJobSerial() As Long
> NewJobSerial = CType((Format$(Int(Rnd() * 424) - 212)) + Format$((Timer *
> 100), "0000000"), Long)
> NewJobSerial = NewJobSerial Xor CType(2147483647 * Rnd(), Integer)
> End Function
>
> Thanks
>
|