• Office 2007
  • I'm a newbie


To treat a large amount of files from one of our machine, I created a small macro.

One of the task I need to do is create a graph with the imported raw data.

I cannot find how to set my 1st Column as the X axis (Time in my case).

this part of the code is:
Code:
    
Sub Graph1()
    Range("A89:I89").Select
    Range(Selection, Selection.End(xlDown)).Select
    ActiveSheet.Shapes.AddChart.Select
    ActiveChart.ChartType = xlXYScatterSmoothNoMarkers
    ActiveChart.Axes(xlValue).Select
    ActiveChart.Axes(xlValue).MinimumScale = 0
End Sub
my A column should be the X Axis but instead it's using it as a series ans uses the line number as an X axis.

I have seen a few different way on several sites, but I never managed to make it work.

If anybody as an idea, please feel free to drop a line.

Regards

Nicolas