- 'Private Sub Worksheet_Change(ByVal Target As Range)
- Dim rng1, rng2 As Range
- Set rng1 = Intersect([F35:F52], Target)
- If rng1 Is Nothing Then Exit Sub
- ActiveSheet.Unprotect "password"
- Application.EnableEvents = False
- [H8] = Format(Now(), "dd/mm/yyyy hh:mm:ss")
- Application.EnableEvents = True
- ActiveSheet.Protect DrawingObjects:=False, Password:="password"
- End Sub
- Set rng2 = Intersect(H35:H52], Target)
- If rng2 Is Nothing Then Exit Sub
- ActiveSheet.Unprotect "password"
- Application.EnableEvents = False
- [H9] = Format(Now(), "dd/mm/yyyy hh:mm:ss")
- Application.EnableEvents = True
- ActiveSheet.Protect DrawingObjects:=False, Password:="password"
- End Sub