Dim Done As Boolean
Done = False
Randomize
While Done = False
RandomNumber = Int(Rnd(1) * 10)
If RandomNumber > 0 And RandomNumber < 7 Then Done = True
Wend
Private Sub Form_Load()
Randomize
End Sub
Private Sub Command1_Click()
Dim rndNumber As Single
Dim number As Integer
rndNumber = Rnd
number = Int(x * rndNumber + 0.9999) 'where x is the maximum number
End Sub
I learn't from a very well-known series of books called Complete Idiots Guides
Int just cut's off all the numbers after the decimal point
And Al, those 21 day books, have you read any of them? Would they actually take 21 days to learn that stuff? Does it mean 21 FULL days or 21 evenings or what?