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
| Sub Radar2()
Dim Ch As ChartObject
Dim NS As Series
Dim X As Range, Y As Range
Dim IndiceEP As Long, IndiceMECA As Long, IndicePrestInt As Long, IndicePrestExt As Long
Application.ScreenUpdating = False
With Worksheets("Feuil1")
'====ici pour mon Test
IndiceEP = 1: IndiceMECA = 4: IndicePrestInt = 6: IndicePrestExt = 10
Set X = Union(.Range("A" & IndiceEP), .Range("A" & IndiceMECA), .Range("A" & IndicePrestInt), .Range("A" & IndicePrestExt))
Set Y = Union(.Range("C" & IndiceEP), .Range("C" & IndiceMECA), .Range("C" & IndicePrestInt), .Range("C" & IndicePrestExt))
'====Fin remplissage
Set Ch = .ChartObjects.Add(60, 80, 250, 250) 'Les nombres désignent Gauche, haut, largeur et hauteur de l'objt graphique
With Ch.Chart
.ChartType = xlRadarMarkers
Set NS = .SeriesCollection.NewSeries
With NS
.XValues = X
.Values = Y
End With
Set NS = Nothing
End With
Set X = Nothing
Set Y = Nothing
Set Ch = Nothing
End With
End Sub |
Partager