VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A randomize function that allows you to specify the high and low number.

by Walter Eigner (15 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 2nd December 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

A randomize function that allows you to specify the high and low number.

Rate A randomize function that allows you to specify the high and low number.



Dim randomNumber
Dim theRand
theRand = Math.Rnd()
randomNumber = theRand * (highNum - (lowNum))
randomNumber = randomNumber + lowNum
rand = Math.Round(randomNumber)
End Function

Download this snippet    Add to My Saved Code

A randomize function that allows you to specify the high and low number. Comments

No comments have been posted about A randomize function that allows you to specify the high and low number.. Why not be the first to post a comment about A randomize function that allows you to specify the high and low number..

Post your comment

Subject:
Message:
0/1000 characters