PDA

Click to See Complete Forum and Search --> : How to generate only whole numbers?


Dude1
Jun 27th, 2002, 09:02 AM
Hi, this is what I have:

Dim i As Single

Private Sub Command1_Click()
For i = 1 To 16
Text1.Text = i * Rnd
Next
End Sub


I get decimal numbers in my text box, how can I limit them to only whole numbers? Thanks

axion_sa
Jun 27th, 2002, 09:29 AM
Text1.Text = CInt(i * Rnd)

Dude1
Jun 27th, 2002, 09:40 AM
Thanks, that worked