'Flash' random numbers
Enter this VBA:
Public whn As Double
Public Const T = 4 ' four seconds
Public Const mac = "flash" ' the name of the procedure to run
Sub StartTimer()
whn = Now + TimeSerial(0, 0, T)
Application.OnTime EarliestTime:=whn, Procedu=mac, Schedule:=True
End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime EarliestTime:=whn, Procedu=mac, Schedule:=False
End Sub
Sub flash()
n = Evaluate("=randbetween(1,30)")
Range("F10").Value = Cells(n, 1).Value
Call StartTimer
End Sub
Start by running StartTimer.
--
Gary''s Student - gsnu200773
"Jock" wrote:
Is it possible to have numbers from a predetermined list, appear in a
specified cell at a specified time interval?
IE from a list in (A1:A30) containing numbers from 1-30, I would like a
random number to appear in F10 every 4 seconds.
What do you think?
--
Traa Dy Liooar
Jock
|