Hi All.
I'm developing a worksheet in which the user enters (or pastes) data into column A, the plot points are calculated in (hidden) columns B to E, and the results are shown in an embedded chart object.
All works fine if the chart is showing; as each new point is added, the dynamic named ranges expand and the chart updates.
The problem is that with only 1 or 0 data points, the chart labels show #NUM! or #DIV/0! error, which looks messy.
I've tried using the WorksheetChange event to move the Chart Object to another sheet if the number of points is 0 or 1, then put it back on Sheet1 when there are 2.
This works fine if you start with no data and the chart hidden. If you put in data one by one, the chart pops up as soon as you enter the second data point.
But if the chart is already showing, the macro stops with a "400" error at that point.
Also, if you have only 1 point, then delete it, the macro tries to hide the already "hidden" chart: 400 error.
Is there some way of setting the "Visible" property of an embedded chart object?
Please help, cos I'm going bananas with this!
I'm developing a worksheet in which the user enters (or pastes) data into column A, the plot points are calculated in (hidden) columns B to E, and the results are shown in an embedded chart object.
All works fine if the chart is showing; as each new point is added, the dynamic named ranges expand and the chart updates.
The problem is that with only 1 or 0 data points, the chart labels show #NUM! or #DIV/0! error, which looks messy.
I've tried using the WorksheetChange event to move the Chart Object to another sheet if the number of points is 0 or 1, then put it back on Sheet1 when there are 2.
This works fine if you start with no data and the chart hidden. If you put in data one by one, the chart pops up as soon as you enter the second data point.
But if the chart is already showing, the macro stops with a "400" error at that point.
Also, if you have only 1 point, then delete it, the macro tries to hide the already "hidden" chart: 400 error.
Is there some way of setting the "Visible" property of an embedded chart object?
Please help, cos I'm going bananas with this!