Bonjour,
Je voudrais afficher dans mon graph
Abscisse = Tarif(colonne J) et en Ordonnée=Modèle (colonne A)
exemple :
colonne A : MSI GE60 2PE-007XFR - Sans OS
colonne J : 1049,00 € TTC
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 Sub AfficherGraph() Dim Graph As ChartObject Dim Fname As String sheet_name = "db_Ordinateur" Worksheets(sheet_name).Activate With ActiveSheet Set Graph = .ChartObjects.Add(200, 100, 500, 300) End With With Graph.Chart .SetSourceData Worksheets(sheet_name).Range("A1:J1") .HasTitle = True .ChartTitle.Text = "essai" '.ChartType = xlLine '.ApplyCustomType ChartType:=xlBuiltIn, TypeName:= _ ' "Courbe - Histo. 2 axes" End With Fname = ThisWorkbook.Path & "\temp.gif" Graph.Chart.Export Filename:=Fname, FilterName:="GIF" UF_Img.IMG_histoTarif.Picture = LoadPicture(Fname) UF_Img.Show End Sub
Partager