Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy chart between multiple sheets in workbook | Charts and Charting in Excel | |||
copy chart formatting and chart templates in Excel 2007 | Charts and Charting in Excel | |||
Change Chart Properties for Multiple Chart Shts using a Worksheet | Charts and Charting in Excel | |||
How do you link chart source data when you copy the chart? | Charts and Charting in Excel | |||
Multiple chart copy | Excel Discussion (Misc queries) |