Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Code to copy chart

Hi,
What code should I write in order to make an exact replace
of a chart I have but paste it as a picture in order for
me to change the series of the original chart whithout
changing the new
Many thanks
Pedro
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Code to copy chart

The only way I can find to do it, is to paste it into a
Word document and copy it back. Very long-winded, but it
works:

Dim Word As Object

' Copy the chart
ActiveChart.ChartArea.Copy
' Open a hidden instance of Word
Set Word = CreateObject("Word.Application")
' Add a blank document and paste in the chart
Word.Documents.Add DocumentType:=wdNewBlankDocument
Word.Selection.Paste
' Select and copy the chart in Word
Word.Selection.WholeStory
Word.Selection.Copy
' Close Word
Word.activedocument.Close 0
Word.Application.Quit
Set Word = Nothing
' Paste it into Excel
ActiveSheet.Paste

Hope this helps
Helen



-----Original Message-----
Hi,
What code should I write in order to make an exact

replace
of a chart I have but paste it as a picture in order for
me to change the series of the original chart whithout
changing the new
Many thanks
Pedro
.

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
code does not copy Wanna Learn Excel Discussion (Misc queries) 2 July 28th 08 05:32 PM
Macro Copy Excel Chart Sheet to PowePoint - Mod of Jon Peltier code Frank Hayes[_2_] Charts and Charting in Excel 6 January 22nd 08 12:26 AM
Copy code Hamster07 New Users to Excel 4 January 30th 07 05:08 PM
copy and use vba code Giz Excel Discussion (Misc queries) 9 November 22nd 06 09:57 PM
Help with COPY code JVLin Excel Discussion (Misc queries) 0 March 6th 05 03:33 PM


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

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"