Copy and paste several charts problem

S

SiriS

Hello,
I use Excel 2002 and Windows 2000 professional.

Here is a code example in which I am trying to just copy two chart
from a template sheet, paste them into another sheet, delete the chart
and then loop 150 times. This causes the problem "Excel cannot paste th
data" after a while.

Why? Any ideas about how to avoid this error message and solve thi
problem?

In my originally code after copying the charts into the new sheet
adjusts the charts and copies them into word, before they are deleted


I have not managed to create the charts completely from scratch by VB
code, this is why I use the template sheet and has to copy the chart
from there.

Thanks,
Sir

Attachment filename: copychartsproblem.zip
Download attachment: http://www.excelforum.com/attachment.php?postid=69453
 
S

SiriS

Hi,
yes, maybe it is a fontscale problem?

But when I add the following code to my example there is no difference
I still get the error message "Excel cannot paste the data" after
while running (error at i = 120):

Code
-------------------

Sheets("myTemplate").ChartObjects(1).Activate
ActiveChart.ChartArea.AutoScaleFont = False

Sheets("myTemplate").ChartObjects(2).Activate
ActiveChart.ChartArea.AutoScaleFont = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top