Spinning numbers

  • Thread starter Thread starter Michael
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Spinning Numbers 1
Excel Forms Spin Button - Return to 1 after max value 0
PowerPoint Super Stuck and Desperately Need Help 0
PowerPoint Freeze animation 1
Practice Math Problems 2
Random Number Generation 5
Excel VB 5
Spin Button 4

Back
Top