création d'un graphique en vba

loic3869

XLDnaute Occasionnel
Bonjour

J'ai utilisé ce code:

Charts.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Sheets("Feuil1").Range("L5000:L65530"), _
PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Feuil1"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Courant Fusible"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Temps"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Courant"
End With
With ActiveChart
.HasAxis(xlCategory, xlPrimary) = False
.HasAxis(xlValue, xlPrimary) = True
End With
ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
ActiveChart.HasLegend = False
ActiveChart.HasDataTable = False
Windows("balise2.xls").SmallScroll Down:=6
ActiveSheet.Shapes("Graphique 13").IncrementLeft -183#
ActiveSheet.Shapes("Graphique 13").IncrementTop 211.5
Windows("balise2.xls").SmallScroll Down:=12
ActiveChart.SeriesCollection(1).Select

Et la ligne ".HasTitle = True" n'est pas reconnu.

La méthose 'HasTitle' de l'objet '_Chart' a échoué. Erreur 1004.

D'ou viendrait le problème ?

Merci d'avance.

Bonne journée.

Loic
 

Discussions similaires

Réponses
1
Affichages
190
Réponses
0
Affichages
169

Statistiques des forums

Discussions
312 379
Messages
2 087 769
Membres
103 662
dernier inscrit
rterterert