Problème de création de graph
Bonjour,
je travaille sous excel 2000.
Je souhaite créer un graph à partir d'un tableau croisé dynamique mais il me met une erreur sur la ligne "Charts.Add". Voici mon code (créer en parti avec l'éditeur de macro) :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Sheets("Synthesis").Select
ActiveSheet.PivotTables("Synthesis").PivotSelect "", xlDataAndLabel
Charts.Add
ActiveChart.SetSourceData Source:=Sheets("Synthesis").Range("D8")
ActiveChart.Location Where:=xlLocationAsNewSheet
ActiveChart.ChartArea.Select
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Synthesis"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Costs"
End With
With ActiveChart.Axes(xlCategory)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
With ActiveChart.Axes(xlValue)
.HasMajorGridlines = False
.HasMinorGridlines = True
End With
ActiveChart.HasDataTable = True
ActiveChart.DataTable.ShowLegendKey = True |
Il me met comme message d'erreur => "Membre de méthode ou de données introuvable"
Est-ce que quelqu'un sait d'où cela provient ? Est-ce qu'il me manque une référence ?
Merci d'avance.