Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Method 'SeriesCollection' of object '_Chart'failed
When I used the following lines to adjust the range of a chart:
If EndRow StartRow Then ActiveSheet.ChartObjects("EnvGraph").Activate ActiveChart.SeriesCollection(1).XValues = Range("A" & StartRow & ":A" & EndRow) ActiveChart.SeriesCollection(1).Values = Range(Col1(ColNum) & StartRow & ":" & Col1(ColNum) & EndRow) ActiveChart.SeriesCollection(2).XValues = Range("A" & StartRow & ":A" & EndRow) ActiveChart.SeriesCollection(2).Values = Range(Col2(ColNum) & StartRow & ":" & Col2(ColNum) & EndRow) Range("A1").Activate End If I got the following run-time error message: Run-time error '-2147221080 (800401a8)': Method 'SeriesCollection' of object '_Chart'failed I suspect that this is due to the use of the sheet.add method: For i = 1 To InputCaseNum If RunThisCase(i) = True Then Sheets.Add Type:=InputTemplate(i) End If Because I didn't get the runtime error when I use the Worksheets.Copy method: Worksheets(InputTemplate(i)).Copy after:=Worksheets(Worksheets.Count) How could I resolve this problem? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add method of SeriesCollection object clears Windows clipboard | Excel Programming | |||
Help: runtime error - Method seriescollection object_chart failed | Charts and Charting in Excel | |||
Help: runtime error "method seriescollection object_chart failed" | Excel Programming | |||
Formatting a new seriescollection in a chart object | Excel Programming | |||
Adding to the SeriesCollection of a chart object in VB6 | Excel Programming |