michaeltsmith93
Board Regular
- Joined
- Sep 29, 2016
- Messages
- 83
Hi,
I posted a question about this earlier, but have discovered a little bit more on my own and have run into a different problem. With the following code, the Undo function is effectively removed. Do I have any options for replicating this code but not making it a worksheet change dependent thing and thereby ruining Undo?
I posted a question about this earlier, but have discovered a little bit more on my own and have run into a different problem. With the following code, the Undo function is effectively removed. Do I have any options for replicating this code but not making it a worksheet change dependent thing and thereby ruining Undo?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim intersection As Range
Set intersection = Application.Intersect(Target, Me.Range("A:K"))
If Not intersection Is Nothing Then
Dim r As Range
For Each r In intersection.Rows
r.EntireRow.Range("M1").Value = Date
r.EntireRow.Range("L1").Value = Application.Username
Next
End If
Application.EnableEvents = True
End Sub