Simple Chonometer VBA Excel
I was trying to do a simple chronometer, while Excel was doing some
procedures.
Something to the user get looking, showing that excel was working.
I tried to use Time, Date and Timer functions. But the three options made
Excel stop responding after 10 seconds. I use 2010 version .
Some code like this:
Sub StopWatch()
Dim i As Integer
Dim t1 As Single
Dim t2 As Single
Application.Calculation = xlCalculationManual
t1 = Timer
i = 0
Do Until i = 60
t2 = Timer
If (t2 - t1) >= 1 Then
t1 = t2
i = i + 1
Range("D4").Value = i
End If
Loop
End sub
I found some stopwatch's routines on the net, but I thought they are very
complex.
Is there some way to use any of that three functions, without stopping Excel?
Thanks for any sugestion.
No comments:
Post a Comment