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

Hi there,

Is there any way that i can copy a user defined number of charts on a
sheet.
There are 24 charts on the sheet and i want to copy a predefined
number of these (for pasting into WORD).
when using.....

ActiveSheet.Shapes.Range(Array("Chart 84", "Chart 85", "Chart
86")).Select

the charts have to be indentified before runtime.

is there a way such as

For a = ChartNumFirst to ChartNumLast
chartobjects(a).copy
next

so i end up with all charts copied, rather than just the last one?


regards,

Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 1,758
Default Multiple chart copy

Option Explicit
Sub testme()

Dim myChartNames() As String
Dim a As Long
Dim ChartNumFirst As Long
Dim ChartNumLast As Long

ChartNumFirst = 1
ChartNumLast = 2
'...
ReDim myChartNames(ChartNumFirst To ChartNumLast)

For a = ChartNumFirst To ChartNumLast
myChartNames(a) = ActiveSheet.ChartObjects(a).Name
Next a

ActiveSheet.ChartObjects(myChartNames).Select

End Sub


MarkyP wrote:

Hi there,

Is there any way that i can copy a user defined number of charts on a
sheet.
There are 24 charts on the sheet and i want to copy a predefined
number of these (for pasting into WORD).
when using.....

ActiveSheet.Shapes.Range(Array("Chart 84", "Chart 85", "Chart
86")).Select

the charts have to be indentified before runtime.

is there a way such as

For a = ChartNumFirst to ChartNumLast
chartobjects(a).copy
next

so i end up with all charts copied, rather than just the last one?

regards,

Mark


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Multiple chart copy

Thanks Dave
I'll give that a go.

Mark



Dave Peterson wrote in message ...
Option Explicit
Sub testme()

Dim myChartNames() As String
Dim a As Long
Dim ChartNumFirst As Long
Dim ChartNumLast As Long

ChartNumFirst = 1
ChartNumLast = 2
'...
ReDim myChartNames(ChartNumFirst To ChartNumLast)

For a = ChartNumFirst To ChartNumLast
myChartNames(a) = ActiveSheet.ChartObjects(a).Name
Next a

ActiveSheet.ChartObjects(myChartNames).Select

End Sub


MarkyP wrote:

Hi there,

Is there any way that i can copy a user defined number of charts on a
sheet.
There are 24 charts on the sheet and i want to copy a predefined
number of these (for pasting into WORD).
when using.....

ActiveSheet.Shapes.Range(Array("Chart 84", "Chart 85", "Chart
86")).Select

the charts have to be indentified before runtime.

is there a way such as

For a = ChartNumFirst to ChartNumLast
chartobjects(a).copy
next

so i end up with all charts copied, rather than just the last one?

regards,

Mark

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 chart between multiple sheets in workbook Sam Charts and Charting in Excel 4 March 12th 10 03:59 PM
copy chart formatting and chart templates in Excel 2007 Astelix Charts and Charting in Excel 4 March 4th 10 04:10 AM
Change Chart Properties for Multiple Chart Shts using a Worksheet KUMPFfrog Charts and Charting in Excel 0 July 22nd 09 11:01 PM
How do you link chart source data when you copy the chart? mamagirl Charts and Charting in Excel 1 December 8th 06 02:40 AM
Multiple chart copy MarkyP Excel Discussion (Misc queries) 2 March 11th 05 06:59 AM


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