Sub Main 'Declares GrapherApp as an object Dim GrapherApp, Plot, Graph, LinePlot As Object Set GrapherApp = CreateObject("Grapher.Application") GrapherApp.Visible = True Set Plot = GrapherApp.Documents.Add(grfPlotDoc) 'Creates a line plot Set Graph = Plot.Shapes.AddLinePlotGraph(GrapherApp.Path+"\samples\tutorial.dat") Set LinePlot = Graph.Plots.Item(1) 'Add line plot that uses columns A and C for X and Y Graph.AddLinePlot(GrapherApp.Path+"\samples\tutorial.dat",1,3) 'Export to JPG Plot.Export("c:\temp\tutorial.jpg") End Sub