Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = "$A$2" And Target.Count = 1 Then
AfficherMasquerPeriodicite
Range("A1").Select
Exit Sub
End If
Init 'Module posologie
If Target.Column = 1 Then Target.Value = Date: Cancel = True
If Not Intersect(Range("C3:C" & Range("A" & Rows.Count).End(xlUp).Row), Target) Is Nothing Then
Cancel = True
If Range("A" & Target.Row) = "" Then
MsgBox "Double Click Cellule A3 pour Afficher la date"
Exit Sub
End If
Target = IIf(Target = "toto", "", "toto")
ElseIf Not Intersect(Range("B3:B" & Range("A" & Rows.Count).End(xlUp).Row), Target) Is Nothing Then
Cancel = True
Target = IIf(Target = NbAmpoule, "", NbAmpoule)
End If
If Target.Column = 9 And Target.Row >= 2 And Target.Row <= 106 Then
Application.EnableEvents = False
With ActiveCell.Offset(0, -8).Resize(1, 8)
If ActiveCell = "Non" Then
ActiveCell = ""
ElseIf ActiveCell = "" Then
ActiveCell = "Oui"
.Font.Strikethrough = True
Else
ActiveCell = "Non"
.Font.Strikethrough = False
End If
End With
With ActiveCell
If .Offset(0, -8) <> "" And .Offset(0, -8).Font.Strikethrough = True Then
.Interior.ColorIndex = 35
.Font.ColorIndex = 5
Else
If ActiveCell = "" Then
.Interior.ColorIndex = 36
Else
.Interior.ColorIndex = 40
.Font.ColorIndex = 5
End If
End If
End With
End If
Cancel = True
Application.EnableEvents = True
End Sub