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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
' GRAPHIQUE 5
Me.lbl_etape.Caption = "En cours : étape 11/12"
DoEvents
debut = debut2
Set xlSheet = xlBook.Worksheets("tableaux_unites")
nbcol = 2
Do
nbcol = nbcol + 1
Loop While xlSheet.Cells(debut, nbcol + 1).Value <> ""
xlapp.ActiveChart.Deselect
Set mychart = xlapp.Charts.Add
mychart.ChartType = xlLine
For i = 1 To mychart.SeriesCollection.Count
mychart.SeriesCollection(1).Delete
Next i
For i = 3 To nbcol
mychart.SeriesCollection.NewSeries
mychart.SeriesCollection(i - 2).Name = "=tableaux_unites!R" & debut & "C" & i
mychart.SeriesCollection(i - 2).Values = "=tableaux_unites!R" & debut + 1 & "C" & i & ":R" & debut + 12 & "C" & i
Next i
mychart.Location WHERE:=xlLocationAsNewSheet, Name:="TauxCumulDom"
With mychart
.HasTitle = True
.ChartTitle.Characters.Text = "Taux cumulés Cimo par unité"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
mychart.HasLegend = False
mychart.HasDataTable = True
mychart.DataTable.ShowLegendKey = True
mychart.Axes(xlValue).Select
xlapp.Selection.TickLabels.NumberFormat = "0.00%"
If nombre_importation > 1 Then
For i = 3 To nbcol
mychart.SeriesCollection(i - 2).Select
With xlapp.Selection.Border
.ColorIndex = 57
.Weight = xlThick
.LineStyle = xlContinuous
End With
With xlapp.Selection
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 3
.Shadow = False
End With
Next i
End If
Set mychart = Nothing
' GRAPHIQUE 6
Me.lbl_etape.Caption = "En cours : étape 12/12"
DoEvents
debut = debut3
Set xlSheet = xlBook.Worksheets("tableaux_unites")
nbcol = 2
Do
nbcol = nbcol + 1
Loop While xlSheet.Cells(debut, nbcol + 1).Value <> ""
Set mychart = xlapp.Charts.Add
mychart.ChartType = xlLine
'For i = 1 To mychart.SeriesCollection.Count
'mychart.SeriesCollection(1).Delete
'Next i
For i = mychart.SeriesCollection.Count To 1 Step -1
'mychart.SeriesCollection(i).Delete
Next i
'For i = 3 To nbcol
For i = 3 To mychart.SeriesCollection.Count + 2
mychart.SeriesCollection.NewSeries
'mychart.SeriesCollection(i - 2).Name = "=tableaux_unites!R" & debut & "C" & i
mychart.SeriesCollection(i - 2).Name = xlapp.Sheets("tableaux_unites").Cells(debut, i)
mychart.SeriesCollection(i - 2).Values = "=tableaux_unites!R" & debut + 1 & "C" & i & ":R" & debut + 12 & "C" & i
Next i
mychart.Location WHERE:=xlLocationAsNewSheet, Name:="TauxMobileDom"
With mychart
.HasTitle = True
.ChartTitle.Characters.Text = "Taux mobiles Cimo par unité"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
mychart.HasLegend = False
mychart.HasDataTable = True
mychart.DataTable.ShowLegendKey = True
mychart.Axes(xlValue).Select
xlapp.Selection.TickLabels.NumberFormat = "0.00%"
If nombre_importation > 1 Then
For i = 3 To nbcol
mychart.SeriesCollection(i - 2).Select
With xlapp.Selection.Border
.ColorIndex = 57
.Weight = xlThick
.LineStyle = xlContinuous
End With
With xlapp.Selection
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 3
.Shadow = False
End With
Next i
End If
set mychart = nothing |
Partager