Spinning numbers

M

Michael

Hi All
Firstly, Merry Xmas to all and thanks for the help over
the past year.
I am using RANDBETWEEN to find a random number to conduct
chook raffles. I have made the result appear on a seperate
sheet so it looks like a raffle draw and not an excel
sheet.
However, I would like the numbers to appear to spin like
poker machine wheels. I have seen this done before in
Excel.
Can someone tell me how to do it.
Regards
Michael
 
R

Rocky McKinley

This will spin a number between 1 and 100 in Range A1, change the sleep
integer to speed up and slow down the spin. Change X for how many spins.

Option Explicit
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub SpinNumber()
Dim X As Integer
For X = 1 To 99
Range("A1") = Int((100 * Rnd) + 1)
Sleep 10
Next X
End Sub
 
Top