Very odd problem here. I'm using some basic VBA to update a few charts based on the user's drop down selection. Everything works as intended, so long as you don't try to change your selection upon loading the file right away. If you scroll through the various charts, and then back up to choose a new selection, it's fine. If you try to run an update first, a run-time error '-2147417848 (80010108)' Method 'AxisGroup' of object 'Series' failed. It then deletes the affected chart. I'm updating other charts the same way and it works fine without scrolling through the worksheet first.
Thanks for any and all help!
Code:
With ActiveSheet.ChartObjects("Chart 9").Chart
.HasAxis(xlCategory, xlPrimary) = True
.SeriesCollection(1).XValues = rcDataOne
.SeriesCollection(1).Values = rcDataTwo
.SeriesCollection(2).AxisGroup = xlSecondary
.SeriesCollection(2).XValues = rcDataOne
.HasAxis(xlCategory, xlSecondary) = False
.HasAxis(xlValue, xlSecondary) = True
.SeriesCollection(2).Values = rcDataThree
End With
Thanks for any and all help!