Using MS Chart with VB Script
I am trying to populate and use the MS Chart active x control with VB Script but when I pass in the array of data I get the following error: "Bad function argument"
Here is the code that generates the error:
Code:
rpt.MSChart1.ChartData = mvarData
Incidentally, I have this working in normal VB and I am trying to translate it to VBScript (which I am less fluent with). Therefore, I know my variant array contains valid data to populate the chart.
Re: Using MS Chart with VB Script
Re: Using MS Chart with VB Script
Yes...but you don't declare variables in vb script, do you?
Previously, I am populating (in a loop) it like this
Code:
ReDim Preserve mvarData(1, mlngJobCategoryCount)
' Add row of data to array
mvarData(0, mlngJobCategoryCount) = mstrJobCategory & " - " & mlngJobCount
mvarData(1, mlngJobCategoryCount) = mlngJobCount
Re: Using MS Chart with VB Script
OK, that's all I could check on.
Btw, what's rpt?
Re: Using MS Chart with VB Script
rpt is the report object (I am scripting within an ActiveReport object).