Знаю, что такие темы есть, коды из них пыталась применить, но они не работают. Данный код работает только на 1 листе, помогите сделать так, чтобы он работал на всех листах.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
For Each cell In Target
If Not Intersect(cell, Range("A2:E4")) Is Nothing Then
With Cells(cell.Row, 6)
.Value = Now
.EntireColumn.AutoFit
End With
With Cells(cell.Row, 7)
.Value = Application.UserName
.EntireColumn.AutoFit
End With
End If
Next cell
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
For Each cell In Target
If Not Intersect(cell, Range("A2:E4")) Is Nothing Then
With Cells(cell.Row, 6)
.Value = Now
.EntireColumn.AutoFit
End With
With Cells(cell.Row, 7)
.Value = Application.UserName
.EntireColumn.AutoFit
End With
End If
Next cell
Application.EnableEvents = True
End Sub