【发布时间】:2021-08-19 18:29:49
【问题描述】:
错误“参数数量错误或属性分配无效”
请帮忙!!
ch.SeriesCollection(1).XValues=sh.Range(Cells(38, 10), Cells(39, 10) &","& Cells(49,10),Cells(50,10))
【问题讨论】:
错误“参数数量错误或属性分配无效”
请帮忙!!
ch.SeriesCollection(1).XValues=sh.Range(Cells(38, 10), Cells(39, 10) &","& Cells(49,10),Cells(50,10))
【问题讨论】:
我想这就是你想要的。
ch.SeriesCollection(1).XValues = sh.Range( _
sh.Range(sh.Cells(38, 10), sh.Cells(39, 10)).Address & _
"," & _
sh.Range(sh.Cells(49, 10), sh.Cells(50, 10)).Address _
)
但最好写成这样:
ch.SeriesCollection(1).XValues = Union( _
sh.Range(sh.Cells(38, 10), sh.Cells(39, 10)), _
sh.Range(sh.Cells(49, 10), sh.Cells(50, 10)) _
)
【讨论】: