I need some code to set the Y values in Graph. I have already had some advice but the code doen't work for me. I am a novice at VBA and my attempts to modify the code have been unsuccessful. My latest attempt is:
Dim myGraph As Object, myChart As Chart
Set myGraph = CreateObject("Graph.Application")
Set myChart = myGraph.Chart("Graph1")
With myChart
.Axes(xlValue).MinimumScale = CDbl(DMin("[ProductSales]", "Sales by
Category"))
.Axes(xlValue).MaximumScale = CDbl(DMax("[ProductSales]", "Sales by
Category"))
End With
Any help appreciated.
Dim myGraph As Object, myChart As Chart
Set myGraph = CreateObject("Graph.Application")
Set myChart = myGraph.Chart("Graph1")
With myChart
.Axes(xlValue).MinimumScale = CDbl(DMin("[ProductSales]", "Sales by
Category"))
.Axes(xlValue).MaximumScale = CDbl(DMax("[ProductSales]", "Sales by
Category"))
End With
Any help appreciated.