Why does the Copy line take so long when running this code?. I'm trying to
copy a chart and paste special to another workbook. When the code gets to
'Selection.copy', the computer hard drive makes a lot of noise and it takes
up to 10 seconds just to complete the copy. Any ideas? I've tried copying
the chart area, but then I don't have the option of 'PasteSpecial'.
ActiveSheet.ChartObjects("Chart 2").Select
ActiveWindow.WindowState = xlNormal
ActiveWindow.WindowState = xlMaximized
Selection.Copy '<---------This line takes awhile
Workbooks(wbname2).Activate
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)",
Link:=False _
, DisplayAsIcon:=False
Thanks,
Paul
1. Copy the chart, not its chart object.
2. Copy as a picture, then do a normal Paste.
ActiveSheet.ChartObjects("Chart 2").Chart.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Workbooks(wbname2).Activate
ActiveSheet.Paste
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______
> Why does the Copy line take so long when running this code?. I'm trying
> to copy a chart and paste special to another workbook. When the code gets
[quoted text clipped - 14 lines]
> Thanks,
> Paul
PCLIVE - 26 Oct 2006 15:01 GMT
Thanks Jon,
That's what I needed.
> 1. Copy the chart, not its chart object.
> 2. Copy as a picture, then do a normal Paste.
[quoted text clipped - 29 lines]
>> Thanks,
>> Paul