I am using an access database to create charts in excel.
To these charts I am adding various trendlines.
The trendlines are created by adding a dataseries to the graph.
seriesToAdd.Name = "For Trendline 1"
seriesToAdd.Trendlines.Add Type:=xlLinear,_
Name:="Trendline 1"
seriesToAdd.MarkerStyle = xlMarkerStyleNone
This creates a trendline with no points showing on the graph but creates a legend entry "For Trendline 1"
This entry I simple deleted by:
achart.Legend.LegendEntries(trendlineNo).Delete
This worked fine until there was 10 or more legend entries.
Is there anyway to delete entries past 10?
Or is there anyway to create a dataseries so that it doesnt create a legend entry?
To these charts I am adding various trendlines.
The trendlines are created by adding a dataseries to the graph.
seriesToAdd.Name = "For Trendline 1"
seriesToAdd.Trendlines.Add Type:=xlLinear,_
Name:="Trendline 1"
seriesToAdd.MarkerStyle = xlMarkerStyleNone
This creates a trendline with no points showing on the graph but creates a legend entry "For Trendline 1"
This entry I simple deleted by:
achart.Legend.LegendEntries(trendlineNo).Delete
This worked fine until there was 10 or more legend entries.
Is there anyway to delete entries past 10?
Or is there anyway to create a dataseries so that it doesnt create a legend entry?