Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 14
Default Copy charts from 1 workbook to another

I have created a macro which copies some charts from one workbook to
another. It has to repeat this for several tabs of the workbook. I
need to know if i need to create an object to copy n paste these
charts or can it be done without an object. A quick reply is
appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 235
Default Copy charts from 1 workbook to another

I believe you would just need to create a worksheet variable combined with a
worksheet loop to copy all of the charts.

If I'm understanding your question correctly, something like this should
hopefully work:

Sub CopyCharts()
Dim wks As Worksheet
Dim cht As ChartObject
For Each wks In Worksheets
For Each cht In wks.ChartObjects
'Your copy and paste code here.
Next cht
Next wks
End Sub

--
John Mansfield
http://cellmatrix.net





"Arlette" wrote:

I have created a macro which copies some charts from one workbook to
another. It has to repeat this for several tabs of the workbook. I
need to know if i need to create an object to copy n paste these
charts or can it be done without an object. A quick reply is
appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 14
Default Copy charts from 1 workbook to another

What if there are about 10 charts and i have to copy just 5 of them?
Should i create objects for each of these 5 to be copied?
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 cells based on conditions in one workbook to another workbook fLiPMoD£ Excel Discussion (Misc queries) 0 August 1st 07 07:43 PM
Copy cells based on conditions in one workbook to another workbook fLiPMoD£ Excel Worksheet Functions 0 August 1st 07 07:43 PM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Excel Discussion (Misc queries) 1 March 16th 06 06:55 PM
Copying charts from workbook to workbook Geoff C Charts and Charting in Excel 2 March 13th 05 05:04 AM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM


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