Hello,
I have been using this macro for a couple of moths now, and for some reason on this particular workbook I'm now getting this message.
I have 3 identical workbooks with the same macro layout and it works on 2 out of the 3, I don't have enough knowledge to know why this one all of a sudden broke.
Sub Davenport_Student_Services()
CopyToPage "Data"
CopyToPage "Fin. Affairs"
MsgBox ("Submitted")
ActiveSheet.PrintOut
End Sub
Function CopyToPage(ws_output As String)
next_row = Sheets(ws_output).Range("A" & Rows.Count).End(xlUp).Offset(1).Row
Sheets(ws_output).Cells(next_row, 1).Value = Range("campus").Value
Sheets(ws_output).Cells(next_row, 2).Value = Range("date_paid").Value
Sheets(ws_output).Cells(next_row, 3).Value = Range("type").Value
Sheets(ws_output).Cells(next_row, 4).Value = Range("amount").Value
Sheets(ws_output).Cells(next_row, 5).Value = Range("payee").Value
Sheets(ws_output).Cells(next_row, 6).Value = Range("payment_for").Value
Sheets(ws_output).Cells(next_row, 7).Value = Range("GL_Number").Value
Sheets(ws_output).Cells(next_row, 8).Value = Range("Notes").Value
End Function
I have put the two commands that are broken in bold. Below is a screenshot of the worksheet it's reporting to.
I have also included the file for more information.