我想使用以下代码循环绘图:
1 For i = 354 To 357
2 Range((Cells(208, 353)), Cells(219, 353)).Select
3 Range(Cells(208, i), Cells(219, i)).Select
4 ActiveSheet.Shapes.AddChart.Select
5 ActiveChart.ChartType = xlColumnClustered
6 ' ActiveChart.SetSourceData Source:=Range("Sheet2!Cells(208,354):Cells(219,354)")
7 ActiveChart.Axes(xlValue).MajorGridlines.Select
8 Application.WindowState = xlMaximized
9 ActiveChart.ApplyLayout (9)
10 Next i
11 End Sub
但是,第 6 行出现运行时错误,有人可以帮忙吗?
干杯