Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Add method of SeriesCollection object clears Windows clipboard Richo Excel Programming 0 June 2nd 06 04:27 PM
Help: runtime error - Method seriescollection object_chart failed huangx06 Charts and Charting in Excel 3 July 9th 05 12:27 AM
Help: runtime error "method seriescollection object_chart failed" huangx06[_2_] Excel Programming 1 July 8th 05 04:58 AM
Formatting a new seriescollection in a chart object Paul Willman Excel Programming 2 August 24th 04 08:22 PM
Adding to the SeriesCollection of a chart object in VB6 E_R[_27_] Excel Programming 0 August 24th 04 06:38 PM


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