Bonjour à tous ,
Voila mon objectif est de récupérer dans un segment de TBC, qui comporte plusieurs options, l'options choisi dans une cellule de mon classeur.
Voici ce que j'ai fait:
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
If Target.Name <> "tab1" Then Exit Sub
For Each Cas In ActiveWorkbook.SlicerCaches("Segment_Catégories").SlicerItems
If Cas.Selected = True Then Sheets("Traitement").Range("F1") = Cas.Name: Exit For
Next Cas
End Sub
Malheureusement ceci ne marche. Pourriez-vous m'aider s'il vous plaît?
Informations:
"tab1" est le nom du TBC lié au "Segment_Catégories"
"tab1" est dans la feuille "Traitement"
"Segment_Catégories" est dans la feuille "Tableau de bord"