我要从Workbook IID.xlsm的E列中复制值,直到找到一个空单元格。并将它们粘贴到Placeholder.xlsm列A中。
我有以下代码,但在第三行出现错误
Dim cnt As Long 'add this to your declarations area
With Workbooks("IID.xls").Sheets("Outage Request List")
cnt = .Range("A5", .Cells(Rows.Count, 2).End(xlUp)).Rows.Count
Workbooks("Placeholder.xlsm").Sheets("Sheet1").Range("E5").Resize(cnt).Value = _
.Range("A5", .Cells(Rows.Count, 2).End(xlUp)).Value
End With
错误1004:应用程序定义的错误或对象定义的错误