05-01-2025, 09:11 PM
Thanks - it's amazing how simple that is.
One thing that tripped me up was the INT function...
I thought that was only for integer types, so I'd need to find the Long equivalent, so I tried CLNG, but no workie.
I tried INT and it worked.
One thing that tripped me up was the INT function...
I thought that was only for integer types, so I'd need to find the Long equivalent, so I tried CLNG, but no workie.
I tried INT and it worked.
Code: (Select All)
Do
Dim MyInt As Integer
MyInt = Int(Rnd * 65536)
Print "MyInt = Int(Rnd * 65536) = " + _ToStr$(MyInt)
Input "Press Enter or Q to quit"; in$
in$ = UCase$(Left$(_Trim$(in$), 1)): If in$ = "Q" Then Exit Do
Dim MyLong As Long
'MyLong = CLng(Rnd * 4294967295)
MyLong = Int(Rnd * 4294967295)
Print "MyLong = CLng(Rnd * 4294967295) = " + _ToStr$(MyLong)
Input "Press Enter or Q to quit"; in$
in$ = UCase$(Left$(_Trim$(in$), 1)): If in$ = "Q" Then Exit Do
Loop
System