Hey all,
I'm having one of those crazy problems where code worked for like 5 minutes, then after no changes, stops working.. ugh
Anyway.. pretty simple. Basically creating a chart, and want to get rid of the initial series that the chart comes with after creation. I have this exact code working in another part of my project, and this code worked fine for a little, then error message saying deletion of series failed.
vb Code:
Set chartLeach = Charts.Add chartLeach.name = chartName With chartLeach If graphStyle = 2 Then .ChartType = xlColumnClustered ElseIf graphStyle = 1 Then .ChartType = xlLine End If Do Until .SeriesCollection.count = 0 .SeriesCollection(1).Delete 'FAILING Loop End With
Is this bad practice? I'm baffled, especially after this exact code works in other spots of my project...
Thanks much!




Reply With Quote