Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Copy-Past as Pictures

Hi All
I have an Application (appWB) that has a sheet with 12 embedded charts, the
following code is used to copy each chart to another workbook (myWB) which
has already been set up with a sheet named Charts.

This process is extremly slow and I suspect it is due to activating and
selecting a range on myWB.Sheets("Charts"). I do not seem to be able to
avoid these steps. Ideally I would rather carry out the task as copy and
paste (as picture) directly.

Each chart has to be selected in turn as I require a picture for each, not
one bigger picture if I were to select ALL charts and copy them across as a
collection.

Any ideas?

'================
' copy the charts
Dim myCh As ChartObject
Dim rX As Integer, cX As Integer

With appWB.Sheets("Charts")
' copy chart objects as images
' start row and column for destination of chart
rX = 5: cX = 1
' process each chart (1 to 12)
For Each myCh In .ChartObjects

myCh.Copy

With myWB.Sheets("Charts")
.Activate
.Cells(rX, cX).Select
.PasteSpecial Format:="Picture (Enhanced Metafile)"
End With

' increment output row for next chart
rX = rX + 13
' test if needs to be in new column
If rX 70 Then
rX = 5: cX = 6
End If

Next
End With
'=====================
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 & past row to column James Excel Discussion (Misc queries) 4 June 23rd 08 05:08 PM
Copy and Past Macro J.W. Aldridge Excel Programming 3 September 21st 07 10:18 PM
Copy and past using a lookup [email protected] Excel Programming 1 September 12th 07 01:37 PM
copy-past and lock cel! albatros Excel Programming 1 September 4th 06 06:13 PM
Copy and Past Joe Excel Discussion (Misc queries) 1 August 17th 06 02:10 AM


All times are GMT +1. The time now is 08:00 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"