if i want to display a random number from 1-999 (including 1 and 999)(no decimals) then what should i do?\
Help Is Appreciated
Printable View
if i want to display a random number from 1-999 (including 1 and 999)(no decimals) then what should i do?\
Help Is Appreciated
I put this code in a new project, its also assuming you have a text box named Text1.
Hope this helps.Code:Private Sub Form_Load()
Randomize
Text1.Text = Int((999 * Rnd) + 1)
End Sub
Michael
Code:Randomize
MsgBox Int(Rnd * 999) + 1