Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("OF").Range("H52:H65"), PlotBy:= _
xlColumns
ActiveChart.SeriesCollection(1).XValues = "=OF!R52C2:R65C2"
ActiveChart.SeriesCollection(1).Name = "=""Temps de production"""
ActiveChart.Location Where:=xlLocationAsObject, Name:="OF"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Temps de production"
.Axes(xlCategory, xlPrimary).HasTitle = False
'.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "OF"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Nb de jours "
End With
With ActiveChart
.HasAxis(xlCategory, xlPrimary) = True
.HasAxis(xlValue, xlPrimary) = True
End With
ActiveChart.Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
With ActiveChart.Axes(xlCategory)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
With ActiveChart.Axes(xlValue)
.HasMajorGridlines = True
.HasMinorGridlines = False
End With
ActiveChart.HasLegend = False
ActiveChart.HasDataTable = False
Windows("CP+cycles+taches.xls").SmallScroll Down:=3
End Sub