Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings, I've tried to combine two worksheet event changes to a single VBA. I think I'm on the right path, I combined the two by adding another Application.EnablEvents. It works fine until I delete any row or cells then it doesn't work. Any suggestions, I'm sure it's just a little tweak?
Thank you,
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Columns.Autofit
If Target.Cells.Count > 1 Then Exit Sub
If Taret.Column <> 6 Then Exit Sub
Application.EnableEvents = False
Cells(Target.Row, "G").Value = UCase(Split(Application.UserName, ",")(0))
Application.EnableEvents = True
End Sub
Thank you,