Hello All.
Can anyone help me with this VBA issue?
In column D users will add info. In column e i have a date stamp and in column f a time stamp. So if anyone amends the info in column d column e will update the date and column f the time.
However if i copy and paste info in to columns a-c the vba doesn't work.
Can anyone explain where it's going wrong or suggest a workable alternative
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'Check if target cells are empty
If Target.Column = 4 And Cells(Target.Row, 1) = "" And Cells(Target.Row, 2) = "" Then
'disable events
Application.EnableEvents = False
'insert current date into column 5
Cells(Target.Row, 5) = Date
'insert current time into column 6
Cells(Target.Row, 6) = Time
'Enable events
Application.EnableEvents = True
End If
End Sub
-----------------
Thanks
Can anyone help me with this VBA issue?
In column D users will add info. In column e i have a date stamp and in column f a time stamp. So if anyone amends the info in column d column e will update the date and column f the time.
However if i copy and paste info in to columns a-c the vba doesn't work.
Can anyone explain where it's going wrong or suggest a workable alternative
--------------------
Private Sub Worksheet_Change(ByVal Target As Range)
'Check if target cells are empty
If Target.Column = 4 And Cells(Target.Row, 1) = "" And Cells(Target.Row, 2) = "" Then
'disable events
Application.EnableEvents = False
'insert current date into column 5
Cells(Target.Row, 5) = Date
'insert current time into column 6
Cells(Target.Row, 6) = Time
'Enable events
Application.EnableEvents = True
End If
End Sub
-----------------
Thanks