当我尝试在范围数组中进行复制时,出现运行时错误,提示“对象不支持此属性或方法”。执行MyRangeArray(x).Copy
时,错误显示在下面的代码的最后一行。如何复制数组中的形状?
'List of PPT Slides to Paste to
MySlideArray = Array(5, 10)
'List of Excel Ranges to Copy from
MyRangeArray = Array(Sheet23.Shapes.Range(Array("Group 18")), Sheet27.Shapes.Range(Array("Group 18")))
'Loop through Array data
For x = LBound(MySlideArray) To UBound(MySlideArray)
'Copy Excel Range
MyRangeArray(x).Copy
答案 0 :(得分:0)
尝试:
Sheets(MyRangeArray(x).Parent.Name).Shapes(MyRangeArray(x).Name).Copy