Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, Essentially I have an existing worksheet with data and would like t create charts from that data and place the charts on this sheet. Whe attempting to run my code, I get an "Automation Error". Here is a excerpt of my code that is currently problematic: If Location1_1 0 Then Set case9 = wb.Charts.Add With case9 .ChartType = xlXYScatterSmooth .Location Whe=xlLocationAsObject, Name:="DataSet 1" .SeriesCollection.NewSeries Set Cycles = SetRange(page1, 3, 62, 8) .SeriesCollection(1).Xvalues = Cycles .SeriesCollection(2).Xvalues = Cycles Set YValues = SetRange(page1, 3, 62, 9) .SeriesCollection(1).Name = "V1" .SeriesCollection(1).Values = YValues .SeriesCollection.NewSeries .SeriesCollection(2).Name = "I1" Set YValues = SetRange(page1, 3, 62, 10) .SeriesCollection(2).Values = YValues .SeriesCollection(2).AxisGroup = 2 <formatting statements End With End If End Sub The compiler highlights the line ".SeriesCollection.NewSeries" as th source of the error. Any help would be greatly appreciated. Thanks -- 3PhaseMacroMa ----------------------------------------------------------------------- 3PhaseMacroMan's Profile: http://www.excelforum.com/member.php...fo&userid=2994 View this thread: http://www.excelforum.com/showthread.php?threadid=49700 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating pivot table to Existing worksheet | Excel Worksheet Functions | |||
Copying a chart and data to existing worksheet | Charts and Charting in Excel | |||
Excel 2007 chart problem with existing spreadsheet | Excel Discussion (Misc queries) | |||
How To: Link worksheet data to pre-existing chart tables | Excel Discussion (Misc queries) | |||
Creating new worksheet from existing | Excel Discussion (Misc queries) |