troubleshooting Question

addchart2 behavior issues - addchart2 modifies existing charts when creating a new chart

Avatar of Don OHara
Don OHara asked on
VBAMicrosoft Excel
6 Comments1 Solution76 ViewsLast Modified:
Excel VBA Charting Question.  (Office 365 on W-10)

In one VBA macro I use addchart2 to sequentially create a series of similar charts, each with differentt raw data.
The first chart is perfect.
However, when I create the second chart, the first chart has its data changed to the new data in the second chart.
Then, when I create the third chart, both the first and second charts are changed to the third chart.

I expected that addchart2 would close out (deactivate, unselect) the previous chart before creating a new chart. I have tried 'ActiveChart.Deactivate' but to no avail.

Please advise,

thanks, Don
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros