PC Review


Reply
Thread Tools Rate Thread

Copy-Past as Pictures

 
 
Nigel RS
Guest
Posts: n/a
 
      10th Jan 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and past =?Utf-8?B?RG9uIE0u?= Windows Vista Hardware 1 15th Oct 2006 12:38 AM
unable to copy pictures from digital camera to my pictures S.Mathew Windows XP Photos 3 30th Aug 2004 08:20 AM
recover past files and pictures jemalone Windows XP General 2 28th Apr 2004 11:09 PM
Re: Copy and past Bonnie Windows XP New Users 1 5th Sep 2003 01:06 PM
Re: Copy and past Chek Windows XP New Users 0 4th Sep 2003 11:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:34 AM.