R
Rémi
Guest
Bonjour à tous,
Je souhaite tracer 2 courbes (nuage de points) ayant la même couleur, voici le bout du code que j'ai fait:
Sheets('Graphique').Select
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(k).Select
ActiveChart.SeriesCollection(k).Name = WS.Name
ActiveChart.SeriesCollection(k).Values = Sheets(WS.Name).Range('F' & Fcell & ':F' & LastLine)
'MsgBox (WSmax)
ActiveChart.SeriesCollection(k).XValues = Sheets(WS.Name).Range('G' & Fcell & ':G' & LastLine)
ActiveChart.SeriesCollection(k).Select
col = Selection.Interior.ColorIndex
MsgBox (col)
k = k + 1
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(k).Select
ActiveChart.SeriesCollection(k).Name = '% cell_' & WS.Name
ActiveChart.SeriesCollection(k).Values = Sheets(WS.Name).Range('H' & Fcell & ':H' & LastLine)
ActiveChart.SeriesCollection(k).XValues = Sheets(WS.Name).Range('G' & Fcell & ':G' & LastLine)
ActiveChart.SeriesCollection(k).Select
With Selection.Interior
.ColorIndex = col
End With
col2 = Selection.Interior.ColorIndex
MsgBox (col2)
Le problème est que d'une part,les courbes générées n'ont pas la même couleur, et que le chiffre revoyé par les MsgBox sont les même:-4105...
Si quelqu'un peut me filer un coup de main...
Merci d'avance
Je souhaite tracer 2 courbes (nuage de points) ayant la même couleur, voici le bout du code que j'ai fait:
Sheets('Graphique').Select
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(k).Select
ActiveChart.SeriesCollection(k).Name = WS.Name
ActiveChart.SeriesCollection(k).Values = Sheets(WS.Name).Range('F' & Fcell & ':F' & LastLine)
'MsgBox (WSmax)
ActiveChart.SeriesCollection(k).XValues = Sheets(WS.Name).Range('G' & Fcell & ':G' & LastLine)
ActiveChart.SeriesCollection(k).Select
col = Selection.Interior.ColorIndex
MsgBox (col)
k = k + 1
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(k).Select
ActiveChart.SeriesCollection(k).Name = '% cell_' & WS.Name
ActiveChart.SeriesCollection(k).Values = Sheets(WS.Name).Range('H' & Fcell & ':H' & LastLine)
ActiveChart.SeriesCollection(k).XValues = Sheets(WS.Name).Range('G' & Fcell & ':G' & LastLine)
ActiveChart.SeriesCollection(k).Select
With Selection.Interior
.ColorIndex = col
End With
col2 = Selection.Interior.ColorIndex
MsgBox (col2)
Le problème est que d'une part,les courbes générées n'ont pas la même couleur, et que le chiffre revoyé par les MsgBox sont les même:-4105...
Si quelqu'un peut me filer un coup de main...
Merci d'avance