riopoti
Messages postés2Date d'inscriptiondimanche 12 septembre 2004StatutMembreDernière intervention21 février 2007
-
21 févr. 2007 à 21:41
chapaleufu
Messages postés29Date d'inscriptionsamedi 28 décembre 2002StatutMembreDernière intervention19 mai 2007
-
3 mars 2007 à 21:07
Bonjour,
je voudrais changer les données source de mon graph sur excel
mais je narrive pas a trouver les ligne de code qui peuvent le faire, bien entendue je veux inclure des variables.
chapaleufu
Messages postés29Date d'inscriptionsamedi 28 décembre 2002StatutMembreDernière intervention19 mai 2007 3 mars 2007 à 21:07
voila le code que j'utilise pour dessiner un histogramme ou LRow design la derniere ligne pour le graphique (j'ai plusieues graphes a faire dans la page)
Dim Cht as Chart
Cells(LRow + 2, 1).RowHeight = 200
Range(Cells(5, 1), Cells(LRow - 1, 1)).Name = "HeaderArea"
Range(Cells(5, LCol), Cells(LRow - 1, LCol)).Name = "DataArea"
Cells(LRow + 2, 1).Name = "TopPos"
Range(Cells(LRow + 2, 1), Cells(LRow + 2, LCol)).Name = "GraphArea"
' draw histogram
Set Cht = Charts.Add
Set Cht = Cht.Location(WHERE:=xlLocationAsObject, Name:="Q&A Input Output")
With Cht
.ChartType = xlColumnClustered
.SetSourceData Source:=Union(Range("HeaderArea"), Range("DataArea")), PlotBy:=xlColumns
With .Parent
.Top = Range("TopPos").Top
.Left = Range("TopPos").Left
.Width = Range("GraphArea").Width
.Height = Range("GraphArea").Height
End With
End With
ActiveChart.Legend.Delete
ActiveWindow.Visible = False