compilation de code

gege21

XLDnaute Occasionnel
bonjours a tous
y a t'il moyen de compile en beaucoup mieux ce code

Code:
Charts.Add
With ActiveChart
    .ChartType = xlLine
    .SeriesCollection.NewSeries
    .SeriesCollection(1).XValues = F1.Range("A2", F1.[A2].End(xlDown))
    .SeriesCollection(1).Values = F1.Range("G2", F1.[G2].End(xlDown))
    .SeriesCollection(1).Name = F1.Range("G1")
    .SeriesCollection.NewSeries
    .SeriesCollection(2).Values = F1.Range("E2", F1.[E2].End(xlDown))
    .SeriesCollection(2).Name = F1.Range("E1")
    .Location Where:=xlLocationAsObject, Name:="graph.mini-maxi"
    End With
Sheets("graph.mini-maxi").Select
ActiveSheet.ChartObjects("Graphique1").Activate
Sheets("graph.mini-maxi").DrawingObjects("Graphique1").RoundedCorners = False
    Sheets("graph.mini-maxi").DrawingObjects("Graphique1").Shadow = False
    Selection.Fill.UserPicture PictureFile:=ThisWorkbook.Path & "\" & "img2.jpg"
    Selection.Fill.Visible = True
With ActiveChart
    .PlotArea.Select
    .Axes(xlValue).CrossesAt = Worksheets("config").Range("K3").Value
    .ChartTitle.Delete
    .ChartObjects("Graphique1").Activate
    .Axes(xlCategory).TickLabelSpacing = Worksheets("config").Range("K4").Value
    .Axes(xlCategory).TickMarkSpacing = Worksheets("config").Range("K5").Value
    .ChartArea.Select
    .Parent.Name = "Graphique1"
    End With
With ActiveSheet.Shapes("Graphique1")
    .Left = Worksheets("config").Range("K6").Value
    .Top = Worksheets("config").Range("K7").Value
    .Width = Worksheets("config").Range("K8").Value
    .Height = Worksheets("config").Range("K9").Value
End With

ActiveChart.PlotArea.Select
    Selection.Fill.UserPicture PictureFile:=ThisWorkbook.Path & "\" & "IMG1.png"
    Selection.Fill.Visible = True
     Sheets("graph.mini-maxi").Select
    ActiveSheet.ChartObjects("Graphique1").Activate
    ActiveChart.SeriesCollection(1).Select
    With Selection.Border
        .ColorIndex = Worksheets("config").Range("O20").Value
        .Weight = xlThin
        .LineStyle = xlContinuous
    End With
    ActiveChart.SeriesCollection(2).Select
    With Selection.Border
        .ColorIndex = Worksheets("config").Range("O21").Value
        .Weight = xlThin
        .LineStyle = xlContinuous
    End With
    ActiveChart.ChartArea.Select
    ActiveChart.Shapes.AddTextbox(msoTextOrientationHorizontal, 550, 10, 100#, 100#).Select
Selection.Characters.Text = "Les Températures"
Selection.AutoScaleFont = True
    With Selection.Font
        .Size = 14
        .Name = "Albertus Medium"
        End With
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        End With
    Selection.ShapeRange.Height = 30
    Selection.ShapeRange.Width = 150
ActiveChart.Legend.Select
Selection.Left = 565
Selection.Top = 40
ActiveChart.Axes(xlValue).MajorGridlines.Select
ActiveChart.ChartArea.Select
ActiveChart.PlotArea.Select
Selection.Width = 1240
[A1].Select
End Sub
 

Discussions similaires

Réponses
1
Affichages
194
Réponses
0
Affichages
175
Réponses
3
Affichages
602

Statistiques des forums

Discussions
312 452
Messages
2 088 544
Membres
103 880
dernier inscrit
rafaelredsc