OliverTheLapponian
New Member
- Joined
- Jan 6, 2022
- Messages
- 7
- Office Version
- 365
- Platform
- Windows
Good day all,
I have the following VBA code below to help show when a change was made in one of the columns in my Excel spreadsheet as well as the username however, I am finding difficulties when I am testing my VBA code. I can only retrieve the username/time stamp if I double click on each individual cell and make edits on a individual cell. This is problematic as I will only receive the username/timestamp on the first pasted cell within a range of cells. Any assistance is greatly appreciated!
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Row > 1 Then
Cells(Target.Row, "O") = Format(Now, "mm/dd/yyyy HH:mm:ss")
Cells(Target.Row, "P") = Environ("username")
End If
Application.EnableEvents = True
End Sub
I have the following VBA code below to help show when a change was made in one of the columns in my Excel spreadsheet as well as the username however, I am finding difficulties when I am testing my VBA code. I can only retrieve the username/time stamp if I double click on each individual cell and make edits on a individual cell. This is problematic as I will only receive the username/timestamp on the first pasted cell within a range of cells. Any assistance is greatly appreciated!
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Row > 1 Then
Cells(Target.Row, "O") = Format(Now, "mm/dd/yyyy HH:mm:ss")
Cells(Target.Row, "P") = Environ("username")
End If
Application.EnableEvents = True
End Sub