Bonjour, Swingy4522 et le forum
tu fais 2 macros , activer et désactiver
Option Explicit
Sub DebutActivite()
Dim Cel As Range
ActiveSheet.Unprotect
Set Cel = Range("B65536").End(xlUp).Offset(1, 0)
With Cel
.Value = Date
.NumberFormat = "d-mmm-yy"
.HorizontalAlignment = xlCenter
With .Offset(0, 1)
.Value = Now
.NumberFormat = "hh:mm"
.HorizontalAlignment = xlCenter
End With
End With
End Sub
Sub FinActivite()
Dim Cel As Range
Set Cel = Range("D65536").End(xlUp).Offset(1, 0)
With Cel
.Value = Now
.NumberFormat = "hh:mm"
.HorizontalAlignment = xlCenter
With .Offset(0, 1)
.FormulaR1C1 = "=RC[-1]-RC[-2]"
'.Value = Time
.NumberFormat = "hh:mm"
.HorizontalAlignment = xlCenter
End With
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
s'il y a un probleme tu me fais signe @+ Rudy