Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Fin: If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, [B5]) Is Nothing Then
ValB5 = [B5] ' Evite de lire 7 fois B5
ActiveSheet.Shapes("Connecteur 1").Visible = ValB5 = "F"
ActiveSheet.Shapes("Connecteur 2").Visible = ValB5 = "R"
ActiveSheet.Shapes("Connecteur 3").Visible = ValB5 = "E"
ActiveSheet.Shapes("Connecteur 4").Visible = ValB5 = "O"
ActiveSheet.Shapes("Rectangle 13").Visible = ValB5 = "F"
ActiveSheet.Shapes("Rectangle 14").Visible = ValB5 = "O"
ActiveSheet.Shapes("Rectangle 15").Visible = ValB5 = "E"
End If
If Target.Address = "$B$5" Then
Select Case Target
Case "": ActiveSheet.ListObjects("Tableau1").Range.AutoFilter Field:=3
Case Else: ActiveSheet.ListObjects("Tableau1").Range.AutoFilter Field:=3, Criteria1:=Target
End Select
ElseIf Target.Address = "$B$6" Then
Select Case Target
Case "": ActiveSheet.ListObjects("Tableau1").Range.AutoFilter Field:=12
Case Else: ActiveSheet.ListObjects("Tableau1").Range.AutoFilter Field:=12, Criteria1:=Target
End Select
ElseIf Target.Address = "$D$6" Then
Select Case Target
Case "": ActiveSheet.ListObjects("Tableau1").Range.AutoFilter Field:=7
Case Else: ActiveSheet.ListObjects("Tableau1").Range.AutoFilter Field:=7, Criteria1:=Target
End Select
[B8].Select
End If
Fin:
Application.ScreenUpdating = True
End Sub