View Single Post
  #6   Report Post  
Andy Pope
 
Posts: n/a
Default Copying a chart and unlinking it from the original workbook

I did test with NA() and blank cells both of these did not present a
problem.

Can you identify the actual line of code that produces the error? When
the error dialog comes up choose Debug. The offending line should be
hilited.

How much data do you have in terms of rows and columns?

Cheers
Andy

rmellison wrote:
Unfortunately can't email any data due to company restrictions. Spoil-sports!

If the problem is the wrong type of variable maybe I need to check the data
to make sure its in number format? Am I along the right lines? All of the
data points are generated by formulae; not sure if this is relevent. Also,
some of the data points are #N/A values, but I need to keep them in this form
so that the original chart uses 'best fit' values across null values, rather
than reverting to zero. Perhaps I need to modify the code to compensate for
#N/A values?

I also have a cell link for the series name (for use in the legend) which I
will also need to unlink. Is this relevent?

That's all I can think of really. As I said, still a bit of a novice with VBA.

Thanks for your help.



"Andy Pope" wrote:


Hi,

That's an error type 13, which suggests the wrong type of value is being
placed in a variable (eg. letter where a number is required).
I have tried various things to re create you problem but can not.

If you want email your workbook to me, off newsgroup, and I will take a
look.

Cheers
Andy

rmellison wrote:

Thanks Andy, Jon Peltier's site was very useful.

I'm using the macro for multiple series with lots of data, however I get an
error at line 13 (i think) saying type mismatch. I thought it may be because
my chart has scatter and line chart data on it, so I deleted the line data
and tried again, but got the same result. I'm somewhat of a novice at VBA,
can you help any further??

Error message in VB reads 'Runtime Error: '13': Type Mismatch'


"Andy Pope" wrote:



Hi,

Jon Peltier explains various way including the picture method.
http://peltiertech.com/Excel/ChartsH...ChartData.html

Cheers
Andy

rmellison wrote:


Is there a way of copyiong a chart from one workbook to another and
'unlinking' it, such that it does not update from the original worksheet if
the original data is changed. Does it need to be copied as a picture or
similar??

Thanks in advance.

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info