Reputation: 970
I have looked over a few questions on the subject, but I still haven't found a solution. Here's my code:
i = APPS_AuditWB.Sheets(3).UsedRange.Rows.Count
DeptReceivedWB.Sheets(1).Copy
With APPS_AuditWB.Sheets(3) 'Deletes Recd date over a year old
.Cells(i + 1, 1).Paste
The last line is where the error occurs. I've tried PasteSpecial as well, but that only pastes the equation for i (APPS_AuditWB.Sheets(3).UsedRange.Rows.Count).
What's going wrong?
Upvotes: 0
Views: 45
Reputation: 11283
Try this:
i = APPS_AuditWB.Sheets(3).UsedRange.Rows.Count
DeptReceivedWB.Sheets(1).Cells(1, 1).CurrentRegion.Copy
APPS_AuditWB.Activate
APPS_AuditWB.Sheets(3).Select
ActiveSheet.Cells(i + 1, 1).Select
ActiveSheet.Paste
Upvotes: 1