Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old October 25th 06, 04:54 PM posted to microsoft.public.excel.charting
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2006
Posts: 1,311
Default Copy Chart and PasteSpecial

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



  #2   Report Post  
Old October 25th 06, 11:25 PM posted to microsoft.public.excel.charting
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 6,582
Default Copy Chart and PasteSpecial

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
_______


"PCLIVE" wrote in message
...
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



  #3   Report Post  
Old October 26th 06, 03:01 PM posted to microsoft.public.excel.charting
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2006
Posts: 1,311
Default Copy Chart and PasteSpecial

Thanks Jon,

That's what I needed.


"Jon Peltier" wrote in message
...
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
_______


"PCLIVE" wrote in message
...
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







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright 2004-2021 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017