Subscript out of range
I'm trying to use the setdata method of the object ChartSpace.
and the error: subscript out of range occurs.
Here goes my code:
Sub inicio()
Dim cht
Dim c
Dim ctr
Dim serie
document.all.ChartDiv.innerHTML = "<CENTER><OBJECT name='WebChart' id='WebChart' height='75%' width='100%' classid='CLSID:0002E556-0000-0000-C000-000000000046'><PARAM NAME='XMLData' VALUE=''></OBJECT></CENTER>"
BI.WebChart.Clear
Set BI.WebChart.DataSource = BI.PivotTable
BI.WebChart.PlotAllAggregates = BI.WebChart.Constants.chPlotAggregatesSeries
set cht = BI.WebChart.Charts(0)
Set c = BI.WebChart.Constants
cht.Type = 6
cht.HasLegend = False
cht.HasTitle = True
cht.Title.Caption = BI.PivotTable.ActiveView.TitleBar.Caption
Call BI.WebChart.SetData(c.chDimSeriesNames, c.chDataBound, c.chPivotColAggregates)
Call BI.WebChart.SetData(c.chDimCategories, c.chDataBound, c.chPivotRows)
Call BI.WebChart.SetData(c.chDimValues, 0, 0)
End Sub
Did anyone have this problem before?? What can I do?????
Thanks for helping
|