Re: Graph le nommer?
bonsoir Kladorrs
pour renommer un graphique qui vient d'etre créé , tu peux essayer
Sub creerEtRenommerGraphique()
Dim NbGraph As Byte
Charts.Add ' ajout graphique
With ActiveChart
.ChartType = xlLine
.SetSourceData Source:=Sheets("Feuil1").Range("A1:B10"), PlotBy:=xlColumns
.Location Where:=xlLocationAsObject, Name:="Feuil1"
End With
NbGraph = ActiveSheet.ChartObjects.Count 'compte le nombre de graphiques dans la feuille
'le nouveau graphique correspond à l'index le plus élevé
ActiveSheet.ChartObjects(NbGraph).Name = "Le nom du Graphique"
End Sub
bonne soirée
[http://quigif.free.fr/pweb10.GIF]
|