[EXCEL] problème macro graphique
Résolu
snoopy
-
mélanie -
mélanie -
Bonjour,
J'ai créé un graphique avec une macro :
Code:
Charts.Add
ActiveChart.SetSourceData Source:=Sheets("Feuil1").Range("B10")
ActiveChart.Location Where:=xlLocationAsNewSheet
ActiveChart.PlotArea.Select
Selection.Border.ColorIndex = 16
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
End With
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SeriesCollection(3).Select
Selection.Interior.ColorIndex = 37
ActiveChart.SeriesCollection(2).Select
Selection.Interior.ColorIndex = 24
Mais cela provoque un beug s'il n'y a pas 3 SeriesCollection. Pouvez-moi m'aider à corriger ce problème ?
J'ai créé un graphique avec une macro :
Code:
Charts.Add
ActiveChart.SetSourceData Source:=Sheets("Feuil1").Range("B10")
ActiveChart.Location Where:=xlLocationAsNewSheet
ActiveChart.PlotArea.Select
Selection.Border.ColorIndex = 16
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
End With
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SeriesCollection(3).Select
Selection.Interior.ColorIndex = 37
ActiveChart.SeriesCollection(2).Select
Selection.Interior.ColorIndex = 24
Mais cela provoque un beug s'il n'y a pas 3 SeriesCollection. Pouvez-moi m'aider à corriger ce problème ?
A voir également:
- [EXCEL] problème macro graphique
- Telecharger macro convertir chiffre en lettre excel - Télécharger - Tableur
- Liste déroulante excel - Guide
- Changer carte graphique - Guide
- Graphique camembert excel - Guide
- Word et excel gratuit - Guide