Sub Macro1()
Range("E2:F8").Select
ActiveSheet.Shapes.AddChart2(322, xlColumnClustered).Select
ActiveChart.FullSeriesCollection(1).ChartType = xlColumnClustered
ActiveChart.FullSeriesCollection(2).ChartType = xlLine
ActiveChart.FullSeriesCollection(2).Select
ActiveChart.FullSeriesCollection(2).AxisGroup = 2
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.FullSeriesCollection(2).Select
End Sub
Sub Macro1()
Range("E2:F8").Select
ActiveSheet.Shapes.AddChart2(322, xlColumnClustered).Select
ActiveChart.FullSeriesCollection(1).ChartType = xlColumnClustered
ActiveChart.FullSeriesCollection(2).ChartType = xlLine
ActiveChart.FullSeriesCollection(2).Select
ActiveChart.FullSeriesCollection(2).AxisGroup = 2
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.FullSeriesCollection(2).Select
End Sub
ActiveChart.FullSeriesCollection(2).AxisGroup = 2
Sub TracerTempFinSeq()
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name = "Gragique" Then
With Application
.ScreenUpdating = False
.DisplayAlerts = False
End With
ws.Delete
Application.ScreenUpdating = True
End If
Next
Sheets.Add(After:=Worksheets(Worksheets.Count)).Name = "Gragique"
Dim Grf As ChartObject
Set ws = Sheets("Gragique")
For Each Grf In ws.ChartObjects
If Grf.Name = "Variation de Force" Then
Grf.Delete
Exit For
End If
Next Grf
Set Grf = ws.ChartObjects.Add(140, 10, 500, 300)
Grf.Name = "Variation de TempFinSeq"
With Grf.Chart
.SeriesCollection.NewSeries
With .SeriesCollection(1)
.ChartType = xlColumnClustered
.Values = Sheets("Feuil2").[C2:C20]
.XValues = Sheets("Feuil2").[A2:A20]
.Name = "TempfinSeqMesure-TempfinSeq4Seq"
.Interior.Color = RGB(0, 0, 255)
End With
.SeriesCollection.NewSeries
With .SeriesCollection(2)
.ChartType = xlColumnClustered
.Values = Sheets("Feuil1").[C2:C20]
.XValues = Sheets("Feuil1").[A2:A20]
.Name = "TempfinSeqMesure-TempfinSeqLam"
.Interior.Color = RGB(255, 0, 0)
End With
.SeriesCollection.NewSeries
With .SeriesCollection(3)
.AxisGroup = 2
.ChartType = xlLine
.Values = Sheets("Feuil2").[E2:E20]
.XValues = Sheets("Feuil2").[A2:A20]
.Name = "TempfinSeqMesure-TempfinSeq4Seq"
.Interior.Color = RGB(0, 0, 255)
End With
.SeriesCollection.NewSeries
With .SeriesCollection(4)
.AxisGroup = 2
.ChartType = xlLine
.Values = Sheets("Feuil1").[E2:E20]
.XValues = Sheets("Feuil1").[A2:A20]
.Name = "TempfinSeqMesure-TempfinSeqLam"
.Interior.Color = RGB(255, 0, 0)
End With
.HasTitle = True
.ChartTitle.Characters.Text = "Variation de TempFinSeq"
End With
End Sub
.Interior.Color = RGB(0, 0, 255)
.Format.Line.ForeColor.RGB = RGB(0, 0, 255)
.Interior.Color = RGB(255, 0, 0)
.Format.Line.ForeColor.RGB = RGB(255, 0, 0)
With .Axes(xlCategory, xlPrimary)
.HasTitle = True
.AxisTitle.Characters.Text = "Durée(s)"
End With
With .Axes(xlValue, xlPrimary)
.HasTitle = True
.AxisTitle.Characters.Text = "%relatif"
End With
With .Axes(xlValue, xSecondery)
.HasTitle = True
.AxisTitle.Characters.Text = "%cummulée"
End With
.Legend.LegendEntries(3).Delete
.Legend.LegendEntries(3).Delete