Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Charting / October 2006

Tip: Looking for answers? Try searching our database.

Copy Chart and PasteSpecial

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PCLIVE - 25 Oct 2006 16:54 GMT
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
Jon Peltier - 25 Oct 2006 23:25 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.