Sub Main Dim GrapherApp As Object Set GrapherApp = CreateObject("Grapher.Application") GrapherApp.Visible = True Set Plot = GrapherApp.Documents.Add(grfPlotDoc) Set Shapes = Plot.Shapes Set LineGraph = Shapes.AddLinePlotGraph(GrapherApp.Path+"\samples\sample3.dat") Set LinePlot = LineGraph.Plots.Item(1) LinePlot.Labels.ShowLabels = True Set PlotLabels = LinePlot.Labels '************************************************************** '************************************************************** 'Return if "First row" is set to Auto 'Correctly returns true Debug.Print "AutoFirstLabelRow (should be True) = "; PlotLabels.AutoFirstLabelRow 'Return "First row value" - should return 2 'Incorrectly returns 0 Debug.Print "First label row (should be 2) = "; PlotLabels.FirstLabelRow 'Set "First row" to Custom 'OK PlotLabels.AutoFirstLabelRow = False 'Set "First row value" to 5 'OK PlotLabels.FirstLabelRow = 5 'Test "First row value" return after custom setting - OK now Debug.Print "First label row (should be 5) = "; PlotLabels.FirstLabelRow 'Return if "Last row" is set to Auto 'Incorrectly returns False Debug.Print "AutoLastLabelRow (should be True) = "; PlotLabels.AutoLastLabelRow 'Return "Last row value" - should return 30 'Incorrectly returns 1 Debug.Print "Last label row (should be 30) = "; PlotLabels.LastLabelRow 'Set "Last row" to Custom 'OK, though according to above this is already custom PlotLabels.AutoLastLabelRow = False 'Set "Last row value" to 25 'OK PlotLabels.LastLabelRow = 25 'Return "Last row value" 'just checking, correctly returns 25 Debug.Print "Last label row (should be 25) = "; PlotLabels.LastLabelRow 'test to see if manually setting AutoLastLabelRow makes a difference PlotLabels.AutoLastLabelRow = True Debug.Print "AutoLastLabelRow (should be True) = "; PlotLabels.AutoLastLabelRow End Sub