Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default ChartObject.Copy very slow

Hi All

I have some code where I use a templated chart to make a copy:

Debug.Print " MC 0: " & Now()
Dim chtObjTemplate As ChartObject, wsCharts As Worksheet
Set wsCharts = ThisWorkbook.Sheets("Charts")
Set chtObjTemplate = wsCharts.ChartObjects("Chart 1")
chtObjTemplate.Copy
Debug.Print " MC 1: " & Now()

I am surprised to find that this takes roughly 5 seconds as the debug
statements show:
MC 0: 27/03/08 08:51:45
MC 1: 27/03/08 08:51:50

My code turns off the screen, disables events and sets calculation to
manual:
Application.ScreenUpdating = False
Application.Calculation = xlManual
Application.EnableEvents = False

So does anyone have any idea why this is taking so long and how to get
around it? This amount of time per chart copy will mean my solution
will not scale.

Is there a better way to ensure that a chart generated automatically
matches the formatting of another chart?

Thanks in advance,
Chrisso

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy and paste slow Tuan Vu[_2_] Excel Discussion (Misc queries) 1 November 25th 09 01:33 PM
Copy command is slow in 2007 Winnipeg Michael Excel Discussion (Misc queries) 0 September 11th 08 07:33 PM
chart vs. chartobject Andreas Wendzel Excel Programming 3 February 7th 07 10:17 PM
copy and paste very slow Alan Excel Discussion (Misc queries) 2 August 5th 05 09:41 PM
ChartObject index Claude Excel Programming 3 January 30th 04 09:33 PM


All times are GMT +1. The time now is 07:33 AM.

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

About Us

"It's about Microsoft Excel"