Hello
Could you help me.
I have some vba code that copies a chart as a picture to a sheet called destination.
The code runs in a loop updating the chart and coying to destination for each line of data (30 lines).
Everytime I run the code at random points in the process (that is not the same graph each time).
I get either runtime error Method copy of object 'ChartArea' failed at the line ActiveChart.ChartArea.Copy or
or runtime error '1004' Unable to get the pastespecial property of the worksheet class at the line ws = ActiveSheet.PasteSpecial(Format:="Picture (PNG)", Link:=False, DisplayAsIcon:=False).
If I click on the debug and then run sub button I carries on with the process of copying the graphs.
I've attached my code.
Thanks for your help.
Could you help me.
I have some vba code that copies a chart as a picture to a sheet called destination.
The code runs in a loop updating the chart and coying to destination for each line of data (30 lines).
Everytime I run the code at random points in the process (that is not the same graph each time).
I get either runtime error Method copy of object 'ChartArea' failed at the line ActiveChart.ChartArea.Copy or
or runtime error '1004' Unable to get the pastespecial property of the worksheet class at the line ws = ActiveSheet.PasteSpecial(Format:="Picture (PNG)", Link:=False, DisplayAsIcon:=False).
If I click on the debug and then run sub button I carries on with the process of copying the graphs.
I've attached my code.
Thanks for your help.