matheusand9
New Member
- Joined
- Jan 19, 2016
- Messages
- 1
Hello
I'm having a small problem which I just can't solve as I'm a very beginner in Excel VBA.
I've been searching for different examples since last week but it doesn't really works. It's quite important for me so I'd really appreciate if someone could help me.
I'd like to make a chart from a .csv file with my values beginning from from the 1342th line until the 4119th. For the Y axis I'd like to use the H column and for X axis, I'd like the B column.
That's what I've done for the moment:
I'm having a small problem which I just can't solve as I'm a very beginner in Excel VBA.
I've been searching for different examples since last week but it doesn't really works. It's quite important for me so I'd really appreciate if someone could help me.
I'd like to make a chart from a .csv file with my values beginning from from the 1342th line until the 4119th. For the Y axis I'd like to use the H column and for X axis, I'd like the B column.
That's what I've done for the moment:
Code:
Sub mychart()
Dim sheet As Chart
Set sheet = Charts.Add
With sheet
.SetSourceData Source:=Sheets("Essai1.steps.tracking").Range("H1342:H4119")
.ChartType = xlLine
.HasTitle = True
.ChartTitle.Text = "Contrainte"
.XValues = Worksheets("Essai1.steps.tracking").Range("B1342:B4119")
End With
End Sub