Création simultanée de deux graphiques
Bonjour les developpez,
Je cherche un code VBA qui puisse produire les deux graphiques en même temps.
avec un compteur "i"
Merci d'avance,
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 25 26 27 28 29 30 31
| ' Graphe 1'
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlAreaStacked
ActiveChart.SetSourceData Source:=Range("'Détails Rang2'!$JM$4:$TN$4")
ActiveChart.SeriesCollection(1).XValues = "='Détails Rang2'!$JO$3:$TN$3"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Accueil"
Dim a As Chart
Set a = ActiveChart
a.ChartArea.Height = 420
a.ChartArea.Width = 760
a.ChartArea.Left = 380
a.ChartArea.Top = 10
' Graphe 2 '
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlAreaStacked
ActiveChart.SetSourceData Source:=Range("'Détails Rang2'!$JM$5:$TN$5")
ActiveChart.SeriesCollection(1).XValues = "='Détails Rang2'!$JO$3:$TN$3"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Accueil"
Dim a As Chart
Set a = ActiveChart
a.ChartArea.Height = 420
a.ChartArea.Width = 760
a.ChartArea.Left = 380
a.ChartArea.Top = 440 |