Reputation: 63
I am usually plotting the x axis data from a range in Column A, and y axis data from a range in y column. These are results of some calculations.
After the graph is plotted, I want to keep the plotted graph (hold on like in MATLAB) and add some further operation on the excel Range in column A. Is there any way to execute this?
In this regard, the chart object is not in the sheet and is added as a chart sheet.
Currently when I do this right now, even if the add the codes to change the operation on column A at the end of my macro (after plotting the desired Graph), still it effects the plotted chart object.
Thank you in advance.
Upvotes: 0
Views: 557
Reputation: 31384
Copy the chart and de-link it by changing the data source to the current data values.
mySeries.XValues = mySeries.XValues
mySeries.Values = mySeries.Values
mySeries.Name = mySeries.Name
Now you'll have a chart frozen in time at those current values. See this post for more details.
Upvotes: 1