Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to add series to a chart using a macro
I am getting the following error for executing this code
Unable to get the chart object property of the worksheet class Please help me solve the problem. I am trying to add 240 series to a chart. If someone can help to add 10 series then I will tweak the code for 240 series. Please help. Code: Dim mySeries As Series For i = 6 To 240 j = ((i - 3) * 524) + 46 k = j + 523 Set mySeries = Sheets("Sheet1").ChartObjects("Chart1"). _ Chart.SeriesCollection.NewSeries mySeries.SeriesCollection(i).XValues = "='Sheet1'!R46C3:R569C3" mySeries.ChartObjects("Chart 1").SeriesCollection(i).Values = "='Sheet1'!R(j)C1:R(k)C1" mySeries.ChartObjects("Chart 1").SeriesCollection(i).Name = "='Sheet1'!R(j)C2" Next |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro to change series xvalues in chart | Excel Programming | |||
Expand Chart Macro to Plot Multiple Series | Excel Programming | |||
Use a macro to expand data series for chart? | Charts and Charting in Excel | |||
Adding data series to chart via macro | Charts and Charting in Excel | |||
how to turn of a series in data sheet of a power point chart using macro | Excel Programming |