Forum Discussion
Need help with VBA - error 424 object required
This line is the issue:
Worksheets("DATA Referal numbers").Select
Full:
Sub AccumlatedDataforQuaterlyReports()
Dim LastRow As Integer, i As Integer, erow As Integer
LastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow
Range(Cells(i, 1), Cells(i, 13)).Select
Selection.Copy
Workbooks.Open Filename:="\\thebridgeeastmidlands-my.sharepoint.com@SSL\personal\data_thebridge-eastmidlands_org_uk\Business Services\CST\16. Communications\14. Reporting\Quaterly Reports\MASTER REPORT.xlsx"
Worksheets("DATA Referal numbers").Select
erow = AactiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Cells(erow, 1).Select
ActiveSheet.Paste
ActiveWorkbook.Save
ActiveWorkbook.Close
Next i
End Sub
Hey Georgina-
I just wanted to follow up and see if you were able to get this code working the way you expected? Please feel free to post back to the community if you need additional help or clarification.