Pratap 1987
Board Regular
- Joined
- Feb 28, 2011
- Messages
- 95
Hi Experts,
I have a basic timer macro – which captures the cycle time (or) current running time on the active cell (in Column L).
It works perfectly fine – when I stay on the active cell (in Column L).
However, when I move to a different row or to a different workbook – The timer stops.
Is there a way – to keep the timer running independently – despite being in a different workbook or sheet or row.
Below is the coding:
Sub Timer_click()
ay = ActiveCell.Row
With Worksheets("Sheet1").Cells(ay, 12)
.Font.Bold = Not .Font.Bold
End With
Update_Timer
End Sub
Sub Update_Timer()
ay = ActiveCell.Row
With Worksheets("Sheet1")
If .Cells(ay, 3) = Empty Or ay = 3 Or .Cells(ay, 12).Font.Bold Then Exit Sub
.Cells(ay, 12) = .Cells(ay, 12) + TimeValue("00:00:01")
End With
Timer_time
End Sub
Sub Timer_time()
Application.OnTime (Now + TimeValue("00:00:01")), "Update_Timer"
End Sub
Appreciate all your assistance with this ?
With Love,
Pratap
I have a basic timer macro – which captures the cycle time (or) current running time on the active cell (in Column L).
It works perfectly fine – when I stay on the active cell (in Column L).
However, when I move to a different row or to a different workbook – The timer stops.
Is there a way – to keep the timer running independently – despite being in a different workbook or sheet or row.
Below is the coding:
Sub Timer_click()
ay = ActiveCell.Row
With Worksheets("Sheet1").Cells(ay, 12)
.Font.Bold = Not .Font.Bold
End With
Update_Timer
End Sub
Sub Update_Timer()
ay = ActiveCell.Row
With Worksheets("Sheet1")
If .Cells(ay, 3) = Empty Or ay = 3 Or .Cells(ay, 12).Font.Bold Then Exit Sub
.Cells(ay, 12) = .Cells(ay, 12) + TimeValue("00:00:01")
End With
Timer_time
End Sub
Sub Timer_time()
Application.OnTime (Now + TimeValue("00:00:01")), "Update_Timer"
End Sub
Appreciate all your assistance with this ?
With Love,
Pratap