在Excel中绘制大量的数据点

我试图在Excel中使用VBAmacros创build大量的数据点。 我的理解是,excel数组不能在一定数量的条目上工作,所以我试图一次绘制500点。

我的代码(从logging的macros修改)如下所示:

Do While ChartStart < rowmax ActiveChart.SetSourceData Source:=Worksheets("DISPLAY").Range(Cells(ChartStart, 1), Cells(ChartStop, 4)) ChartStart = ChartStart + 500 ChartStop = ChartStop + 500 Loop 

当我运行这个时,我得到了一个1004(对象或应用程序定义)错误。 怎么了?