Private test As Boolean
Private Sub Worksheet_selectionChange(ByVal Target As Range)
Dim PL As Range
If test = True Then Exit Sub
Set PL = Application.Union(Range("B4"), Range("AF5"), Range("M9"))
If Application.Intersect(PL, Target) Is Nothing Then Exit Sub
test = True
Select Case Target.Address
' 1er type : si on clic sur , alors on déclenche une macro
Case "$B$4"
Call macro1
'2ème type : si on clique sur AF, et que la valeur de la cellule BE2 est 2, on déclenche une macro, sion, pn déclanche une autre macro
Case "$AF$5"
If Cells(2, 57) = 2 Then '
Call macro2
End If
If Cells(2, 57) <> 2 Then
Call macro3
End If
End If
Case "$M$9"
If Cells(6, 57) = 200 Then
Cells(6, 57) = 201
Range("$M$9:$P$10").Font.ColorIndex = 2
Else
Cells(6, 57) = 200
Range("$M$9:$P$10").Font.Color = -16777024
End If
Cells(1, 1).Activate
Case Else
Cells(6, 57) = Cells(6, 57)
End Select
test = False
End Sub