le code modifié, rest à ajouter les "_" aux différent noms :
Sub Click_carte()
' ******Macro affiche des informations synthétiques par département lorsqu'il y a clique sur un département
' Déclaration des variables
Dim i As Integer
Dim J As Integer
Dim derniereLigne As Long
Dim nb As Integer
nb = 0
' variable nom de la forme
Dim NomShape As String
Dim nomDept As String
Dim Shape As Shape
Derniere_ligne = Sheets("BDD").Range("A2").End(xlDown).Row
'Permet de détecter quelle forme a été cliquée
NomShape = Application.Caller
NomShape = Right(NomShape, Len(NomShape) - 1)
Application.ScreenUpdating = False
'Mise en couleur par défault sur toutes les formes de la feuille active
For Each Shape In ActiveSheet.Shapes
If Left(Shape.Name, 1) = "_" Then Shape.Fill.ForeColor.RGB = RGB(230, 224, 236)
Next Shape
'Affectation d'une couleur quand la forme est sélectionnée
ActiveSheet.Shapes("_" & NomShape).Fill.ForeColor.RGB = RGB(204, 192, 218)
'nettoie le tableau de synthèse
Sheets("Cartographie").Range("L26:U67").ClearContents
'Affiche dans le tableau de synthèse
Sheets("BDD").Cells(1, 1).AutoFilter
Sheets("BDD").Range("$A$1:$Z$500").AutoFilter Field:=2, Criteria1:=NomShape
For i = 2 To 500
If Sheets("BDD").Cells(i, 2) = NomShape Then
nb = nb + 1
Sheets("Cartographie").Cells(25 + nb, 12) = Sheets("BDD").Cells(i, 2) 'Territoire
Sheets("Cartographie").Cells(25 + nb, 13) = Sheets("BDD").Cells(i, 1) 'Contractualisation
Sheets("Cartographie").Cells(25 + nb, 14) = Sheets("BDD").Cells(i, 3) 'Nom de la contractualisation
Sheets("Cartographie").Cells(25 + nb, 15) = Sheets("BDD").Cells(i, 4) 'Secteur
Sheets("Cartographie").Cells(25 + nb, 16) = Sheets("BDD").Cells(i, 8) 'Statut
Sheets("Cartographie").Cells(25 + nb, 17) = Sheets("BDD").Cells(i, 16) 'Thématique d'action
Sheets("Cartographie").Cells(25 + nb, 18) = Sheets("BDD").Cells(i, 15) 'Périmètre d'action
Sheets("Cartographie").Cells(25 + nb, 19) = Sheets("BDD").Cells(i, 5) 'Date de signature
Sheets("Cartographie").Cells(25 + nb, 20) = Sheets("BDD").Cells(i, 6) 'Date fin prévue
Sheets("Cartographie").Cells(25 + nb, 21) = Sheets("BDD").Cells(i, 12) 'Budget
End If
Next i
Sheets("BDD").Select
Selection.AutoFilter
Sheets("calcul").Activate
Range("H4").Select
ActiveSheet.PivotTables("Nb_contractualisation").PivotCache.Refresh
Sheets("Cartographie").Activate
Range("A1").Select
End Sub
@ bientôt
LouReed