دستوارت جهت ثبت تاریخ در سلول دلخواه با هر تغییری در سلول های مورد نظر
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 1 Or Target.Column = 2 Or Target.Column = 3 Then
thisRow = Target.Row
If Target.value <> "" Then
Range("D" & thisRow).Interior.ColorIndex = 3
Range("D" & thisRow).value = Now
Else
'Range("B" & thisRow).Interior.ColorIndex = xlColorIndexNone'
End If
End If
If Target.Column = 7 Then
Row = Target.Row
If Target.value = 1 Then
Range("E" & Row).Interior.ColorIndex = 5
Range("E" & Row).value = Now
End If
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 1 Or Target.Column = 2 Or Target.Column = 3 Then
thisRow = Target.Row
If Target.value <> "" Then
Range("D" & thisRow).Interior.ColorIndex = 3
Range("D" & thisRow).value = Now
Else
'Range("B" & thisRow).Interior.ColorIndex = xlColorIndexNone'
End If
End If
If Target.Column = 7 Then
Row = Target.Row
If Target.value = 1 Then
Range("E" & Row).Interior.ColorIndex = 5
Range("E" & Row).value = Now
End If
End If
End Sub
