hi, I am having a few difficulties using the xlXYScaller graph in where it adds in three blank series into the graph. Unsure how this works but this series indicates in the legend and looks a bit of a mess.
I have been trying to use this code:
It gives me an error under '
'Run-time error '13': Type mismatch
Not sure how to get around this or perhaps there is an easier way, thank you.
I have been trying to use this code:
HTML:
Dim c As Chart: Set c = activechart
Dim i As Integer
Dim a As Variant
c.HasLegend = False
c.HasLegend = True
n = 0 'Counter
For i = 1 To 6
a = c.SeriesCollection(i).Values
If WorksheetFunction.Sum(a) = 0 Then
c.Legend.LegendEntries(i-n).Delete 'Added in Counter
n = n+1 'Counter
End If
Next i
It gives me an error under '
HTML:
If Worksheetfunction.Sum(a) = 0
Not sure how to get around this or perhaps there is an easier way, thank you.