Bonjour,
J'ai déjà inséré ce code :
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Unprotect Password:="timeo"
If Not Intersect(Target, [D5:D48,E5:E48,F5:F48,P5:P48,Q5:Q48,R5:R48,AB5:AB48,AC5:AC48,AD5:AD48]) Is Nothing Then
Cancel = True
If Target = "" Then
Target = "Oui"
Target.Interior.ColorIndex = 2
Else
Target = ""
Target.Interior.ColorIndex = xlNone
End If
End If
Protect Password:="timeo"
End Sub
Et je voudrais ajouter ce code ci :
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column <> 7 Or Target.Row > 48 Or Target.Row < 5 Then Exit Sub
With Target
.Value = Now
.NumberFormat = "hh:mm"
End With
Cancel = True
End Sub
J'ai essayé de le mettre à la suite du 1er code mais ça ne fonctionne pas.
Comment faire SVP?
Merci.