hi I am trying to call a macro of running clock based on cell value could you plz assist as iam unable to run the
Private Sub Worksheet Change(ByVal Target As Range) when I debug it does not move after
Private Sub Worksheet Change(ByVal Target As Range) many thanks plz find the below code
Private Sub Worksheet Change(ByVal Target As Range) when I debug it does not move after
Private Sub Worksheet Change(ByVal Target As Range) many thanks plz find the below code
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
lrow = ActiveSheet.Range("A121").End(xlUp).Offset(1, 0).Row
If Not Intersect(Target, ActiveSheet.Range("D" & lrow)) Is Nothing Then
If Target.Value = "Complete" Then Application.Run "runClock"
End If
End Sub
global clockOn As Boolean
Sub runClock()
Range("A1").Value = Now()
If clockOn = True Then
Application.OnTime Now + TimeValue("00:00:01"), "runClock"
End If
End Sub
Sub startClock ()
clockOn=True
runClock
End Sub
Sub stopClock()
clockOn=False
End Sub
Last edited: