PC Review


Reply
Thread Tools Rate Thread

Copy and paste a chart to another worksheet

 
 
Flystar
Guest
Posts: n/a
 
      11th May 2004
How do I copy a chart *exactly* as it is (same fonts, colors, dat
range, titles etc) to another worksheet in another workbook. I ca
easily enough open a workbook and a particular worksheet, but when
copy and paste the chart the axes font size changes.

'The following is the code I use to copy the active chart to anothe
workbook, and paste it at position A3
ActiveSheet.ChartObjects(1).Activate 'Chart to copy
ActiveChart.ChartArea.Select
ActiveChart.ChartArea.Copy
Workbooks("ChartBook.xls").Worksheets("A").Paste
Workbooks("ChartBook.xls").Worksheets("A").ChartObjects(1).Left
Workbooks("ChartBook.xls").Worksheets("A").Range("A3").Left
Workbooks("ChartBook.xls").Worksheets("A").ChartObjects(1).Top
Workbooks("ChartBook.xls").Worksheets("A").Range("A3").Top
ActiveSheet.Activat

--
Message posted from http://www.ExcelForum.com

 
Reply With Quote
 
 
 
 
anurag.d
Guest
Posts: n/a
 
      11th May 2004
Hi
Right click your sheet containing the chart.
Click the move command.
Select the workbook u want to move your chart to and move it

--
Message posted from http://www.ExcelForum.com

 
Reply With Quote
 
Flystar
Guest
Posts: n/a
 
      11th May 2004
Thanks for your help anurag.d.

I actually want to copy and paste the chart using a vba macro (as th
code I attached suggests). I generate a chart in one worksheet, forma
the axes, colors etc and then want to copy this active chart to anothe
worksheet in a different workbook. I have tried copying and pasting th
chart to the same worksheet, and here the fonts change also.

Is this the correct method for copying the chart in the first place, o
is there a better way?

ACTIVECHART.CHARTAREA.SELEC
*ActiveChart.ChartArea.Copy*

Is this the correct way to paste the chart?

*Workbooks("ChartBook.xls").Worksheets("A").Paste

--
Message posted from http://www.ExcelForum.com

 
Reply With Quote
 
Flystar
Guest
Posts: n/a
 
      12th May 2004
I suppose I could place all of the formating code I perform for the
original chart (the one I want to copy) into a function, and then call
this function again for the chart I paste into the other worksheet.
However, to do this I would like to pass the chart object as a
parameter. How could I do this? Or should I just set the chart to
format as activechart, format, and then activate the original worksheet
again.

It would be fantastic if someone could help me out with this one.


---
Message posted from http://www.ExcelForum.com/

 
Reply With Quote
 
Flystar
Guest
Posts: n/a
 
      13th May 2004
Is there a way to copy the chartobject and paste the object, rather the
copying and pasting the chartarea

--
Message posted from http://www.ExcelForum.com

 
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 & paste worksheet with print settings into new worksheet Larry Ohio Microsoft Excel Misc 1 23rd Dec 2009 05:17 PM
Copy and Paste Chart as Picture into another workbook or worksheet =?Utf-8?B?U3RldmVD?= Microsoft Excel Charting 1 15th Feb 2007 11:47 PM
Copy & paste cells fr open worksheet then close the worksheet =?Utf-8?B?U2lu?= Microsoft Excel Programming 1 2nd Oct 2006 02:20 PM
Re: excel 97: copy and paste values from one worksheet to another worksheet JMCN Microsoft Excel Programming 2 23rd Sep 2003 01:32 PM
excel 97: copy and paste values from one worksheet to another worksheet Kathy Microsoft Excel Programming 0 21st Sep 2003 03:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:10 AM.