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 122 123
| Dim Shap As Shape
Enum Style
ExlColumnClustered = xlColumnClustered
ExlColumnStacked = xlColumnStacked
ExlColumnStacked100 = xlColumnStacked100
Exl3DColumnClustered = xl3DColumnClustered
Exl3DColumnStacked = xl3DColumnStacked
Exl3DColumnStacked100 = xl3DColumnStacked100
Exl3DColumn = xl3DColumn
ExlCylinderColClustered = xlCylinderColClustered
ExlCylinderColStacked = xlCylinderColStacked
ExlCylinderColStacked100 = xlCylinderColStacked100
ExlCylinderCol = xlCylinderCol
ExlConeColClustered = xlConeColClustered
ExlConeColStacked = xlConeColStacked
ExlConeColStacked100 = xlConeColStacked100
ExlConeCol = xlConeCol
ExlPyramidColClustered = xlPyramidColClustered
ExlPyramidColStacked = xlPyramidColStacked
ExlPyramidColStacked100 = xlPyramidColStacked100
ExlPyramidCol = xlPyramidCol
ExlLine = xlLine
ExlLineStacked = xlLineStacked
ExlLineStacked100 = xlLineStacked100
ExlLineMarkers = xlLineMarkers
ExlLineMarkersStacked = xlLineMarkersStacked
ExlLineMarkersStacked100 = xlLineMarkersStacked100
Exl3DLine = xl3DLine
ExlPie = xlPie
ExlPieExploded = xlPieExploded
ExlPieOfPie = xlPieOfPie
ExlBarOfPie = xlBarOfPie
Exl3DPie = xl3DPie
Exl3DPieExplodede = xl3DPieExploded
ExlBarClustered = xlBarClustered
ExlBarStacked = xlBarStacked
ExlBarStacked100 = xlBarStacked100
Exl3DBarClustered = xl3DBarClustered
Exl3DBarStacked = xl3DBarStacked
Exl3DBarStacked100 = xl3DBarStacked100
ExlCylinderBarClustered = xlCylinderBarClustered
ExlCylinderBarStacked = xlCylinderBarStacked
ExlCylinderBarStacked100 = xlCylinderBarStacked100
ExlConeBarClustered = xlConeBarClustered
ExlConeBarStacked = xlConeBarStacked
ExlConeBarStacked100 = xlConeBarStacked100
ExlPyramidBarClustered = xlPyramidBarClustered
ExlPyramidBarStacked = xlPyramidBarStacked
ExlPyramidBarStacked100 = xlPyramidBarStacked100
ExlArea = xlArea
ExlAreaStacked = xlAreaStacked
ExlAreaStacked100 = xlAreaStacked100
Exl3DArea = xl3DArea
Exl3DAreaStacked = xl3DAreaStacked
Exl3DAreaStacked100 = xl3DAreaStacked100
ExlXYScatter = xlXYScatter
ExlXYScatterSmooth = xlXYScatterSmooth
ExlXYScatterSmoothNoMarkers = xlXYScatterSmoothNoMarkers
ExlXYScatterLines = xlXYScatterLines
ExlXYScatterLinesNoMarkers = xlXYScatterLinesNoMarkers
ExlDoughnut = xlDoughnut
ExlDoughnutExploded = xlDoughnutExploded
ExlBubble = xlBubble
ExlBubble3DEffect = xlBubble3DEffect
ExlRadar = xlRadar
ExlRadarMarkers = xlRadarMarkers
ExlRadarFilled = xlRadarFilled
ExlSurface = xlSurface
ExlSurfaceWireframe = xlSurfaceWireframe
ExlSurfaceTopView = xlSurfaceTopView
ExlSurfaceTopViewWireframe = xlSurfaceTopViewWireframe
End Enum
Public Sub SaveAs_Image(Feuille As Worksheet, Non As String, fichier As String)
For Each MyObject In Feuille.Shapes
If MyObject.Name = Non Then
MyObject.Chart.Export Filename:=fichier, FilterName:="GIF"
Exit Sub
End If
Next
End Sub
Public Sub Delete(Feuille As Worksheet, Non As String)
For Each MyObject In Feuille.Shapes
If MyObject.Name = Non Then MyObject.Delete: Exit Sub
Next
End Sub
Public Sub Nouveau(Feuille As Worksheet, Non As String)
Set Shap = Feuille.Shapes.AddChart
Shap.Name = Non
End Sub
Public Sub Source(MyRange As Range, Orientation As Long)
Shap.Chart.SetSourceData MyRange, Orientation
End Sub
Public Sub Style(MyStyle As Style)
Shap.Chart.ChartType = MyStyle
End Sub
Public Sub SeriesCollection_Caption(Caption As String, Element As MsoChartElementType)
Dim e
Shap.Chart.SetElement Element
Select Case Element
Case 2
Shap.Chart.ChartTitle.Text = Caption
Case 301
Shap.Chart.Axes(xlCategory, xlPrimary).AxisTitle.Text = Caption
Case 309
Shap.Chart.Axes(xlValue, xlPrimary).AxisTitle.Text = Caption
End Select
End Sub
Public Sub SeriesCollection(V)
Shap.Chart.SeriesCollection(1).XValues = V
End Sub
Public Sub SeriesCollection_Visible()
Shap.Chart.SeriesCollection(1).ApplyDataLabels
End Sub
Public Sub Taille(Hauteur As Integer, Largeur As Integer)
Shap.Height = Hauteur
Shap.Width = Largeur
End Sub
Public Sub Position(X As Integer, Y As Integer)
Shap.Top = X
Shap.Left = Y
End Sub |
Partager