Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If your code is indeed as shown, the answer I think is simple: note you have
"Axes(x1Category)" where it should be "Axes(xlCategory)" -- - K Dales "looloo" wrote: Good Afternoon, I did an extensive search through the archives and could not find a similar problem. I am trying to manipulate a chart within a chart. I receive the following error on the last line of code: automation error 2147221080 (800401a8) Here is the portion of code where it bombs: Sub CreateNewTrendChartNew() Dim trendRng As Range, avgRng As Range, axisRng As Range Dim data_sheet As Worksheet Dim columnz900 As Integer Dim seriesLoop As Integer Dim Trends_Chart As Chart, TrendAvg_Chart As Chart Set Weekly_WB = Workbooks("H4.weeklys.test.xls") Set data_sheet = Weekly_WB.Sheets("DATA") Set Trends_Chart = Weekly_WB.Charts("Trends") Trends_Chart.Activate Charts.Add ActiveChart.Name = "Trend Averages" Set TrendAvg_Chart = Weekly_WB.Charts("Trend Averages") TrendAvg_Chart.ChartType = xlColumnClustered TrendAvg_Chart.SetSourceData Source:=avgRng, PlotBy:= _ xlColumns For z = 1 To 12 TrendAvg_Chart.SeriesCollection(1).Delete Next z TrendAvg_Chart.SeriesCollection.NewSeries TrendAvg_Chart.SeriesCollection(1).XValues = axisRng TrendAvg_Chart.SeriesCollection(1).Values = avgRng TrendAvg_Chart.Location Whe=xlLocationAsObject, Name:="Trends" ' BOMBS ON THE FOLLOWING LINE TrendAvg_Chart.Axes(x1Category).TickLabels.NumberF ormat = "mmm" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run time error 1004 - unable to get the chartObjects property of the worksheet class | Excel Programming | |||
Compile error automation error | Excel Programming | |||
compile error automation error | Excel Programming | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming | |||
Unknown where is the problem on the Runtime error - Automation error | Excel Programming |