Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Application.EnableEvents = False
If IsEmpty(Target) Then [B1:C1].ClearContents Else [B1:C1] = Array(Date, Time)
Application.EnableEvents = True
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("A:A")) Is Nothing Then Exit Sub
If Target.Count > 1 Then Exit Sub
Application.EnableEvents = False
If Target.Value <> "" Then
Target.Offset(, 1) = Date
Target.Offset(, 2) = Time
End If
Application.EnableEvents = True
End Sub
Thank You, it workedA VBA event demonstration to paste only to the worksheet module :Code:Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then Application.EnableEvents = False If IsEmpty(Target) Then [B1:C1].ClearContents Else [B1:C1] = Array(Date, Time) Application.EnableEvents = True End If End Sub
Do you like it ? So thanks to click on bottom right Like !
Thank you, you went a step further for me, I appreciate it. It works perfectly.Hello Pasadu,
I'm going to assume that you are wanting the event to happen in any cell in Column A. Hence, try this:-
Code:Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Columns("A:A")) Is Nothing Then Exit Sub If Target.Count > 1 Then Exit Sub Application.EnableEvents = False If Target.Value <> "" Then Target.Offset(, 1) = Date Target.Offset(, 2) = Time End If Application.EnableEvents = True End Sub
I hope that this helps.
Cheerio,
vcoolio.