我试图自动填充到下一列,我设置了范围,检查了它们,并使用.Select选择了它们,但是当我运行它错误的代码时,会说“Range类的autofill方法失败”
LastRow = [C65000].End(xlUp).Row
LastColumn = [IV5].End(xlToLeft).Column
Set AutoFillSource = Range(Cells(5, LastColumn), Cells(LastRow, LastColumn))
Set AutoFillRangeTo = Range(Cells(5, LastColumn + 1), Cells(LastRow, LastColumn + 1))
AutoFillSource.AutoFill Destination:=AutoFillRangeTo发布于 2016-06-17 11:07:16
目标范围必须包括源范围。使用:
Set AutoFillRangeTo = Range(Cells(5, LastColumn), Cells(LastRow, LastColumn + 1))https://stackoverflow.com/questions/37879806
复制相似问题