Dim value As Integer = CInt(Int((9 * Rnd()) + 0)) it always give me the value = 6
Dont use the old Randomize() function. Use the Random class
Rate posts that helped you. I do not reply to PM's with coding questions. How to Get Your Questions Answered Current project: tunaOS Me on.. BitBucket, Google Code, Github (pretty empty)
vb Code: Dim myRnd As New Random Dim myVal As Integer = myRnd.Next(1, 11) That will return integer values between 1 and 10.
Dim myRnd As New Random Dim myVal As Integer = myRnd.Next(1, 11)
Forum Rules