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
|
' Création de la zone de texte dans le graphique
ActiveSheet.ChartObjects("Graphique 1").Activate
ActiveChart.PlotArea.Select
ActiveChart.Shapes.AddTextbox(msoTextOrientationHorizontal, 75, 55.5, 78.75, _
41.25).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "essai"
Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 5).ParagraphFormat. _
FirstLineIndent = 0
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 5).Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Size = 11
.Name = "+mn-lt"
End With
Range("E13").Select
' Modification du texte de la zone de texte
ActiveSheet.ChartObjects("Graphique 1").Activate
ActiveChart.Shapes.Range(Array("TextBox 1")).Select
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = "essai2"
Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6).ParagraphFormat. _
FirstLineIndent = 0
With Selection.ShapeRange(1).TextFrame2.TextRange.Characters(1, 6).Font
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Size = 11
.Name = "+mn-lt"
End With
Range("E13").Select |
Partager