Hi this might be one of the old tricks in the book but also this is a simple one i believe, ok here is what i am trying to do
in the below code i want to take note of time that happens each time (pls see attached file)
Private Sub Worksheet_Change(ByVal Target As Range)
Dim x As Long
x = 1
If (Range("J5").Value = Range("D4").Value) Then
For x = 1 To 10
Range("D4").Interior.ColorIndex = 16
Range("D4").Locked = True
Cells(x, 11).Value = "ok"
Next x
'Range("K1").Value = Time.Now()
End If
End Sub
but the problem is that i can't progress on to the next row because the loop goes back to X=1
again and again, how to overcome this?
Bookmarks