[英]Add Different Range to Same Series in Chart
Error " Wrong number of arguments or invalid property assignments"错误“arguments 数量错误或属性分配无效”
Please Help!!请帮忙!!
ch.SeriesCollection(1).XValues=sh.Range(Cells(38, 10), Cells(39, 10) &","& Cells(49,10),Cells(50,10))
I think this is what you were going for.我想这就是你想要的。
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 _
)
But its much better to be written like:但最好写成这样:
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)) _
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.