Bonjour,
J'ai créé une macro créant un graphique à partir d'un tableau croisé dynamique :
On Error GoTo 0
Charts.Add
With ActiveChart
.SetSourceData Source:=Sheets("TCD").Range("B8")
.Location Where:=xlLocationAsNewSheet
With .PlotArea
.Border.ColorIndex = 16
With .Interior
.ColorIndex = 2
.PatternColorIndex = 1
End With
End With
.ChartType = xlColumnClustered
On Error Resume Next
.SeriesCollection(2).Interior.ColorIndex = 24
.SeriesCollection(3).Interior.ColorIndex = 20
.SeriesCollection(4).Interior.ColorIndex = 37
End With
ActiveSheet.Name = "Graph TCD"
Le problème, c'est que lorsque je filtre un critère sur mon TCD, les couleurs du graphique changent ... Je voudrais donc pouvoir associer à chaque élément (ici 4 établissements différents) des couleurs ne changeant pas par la suite.
Merci beaucoup
Configuration: Windows XP Internet Explorer 6.0