this vba code to loop through and copy and paste a new line every until it finds a zero keeps giving me a Run-time error '1004'. I can't quite figure out what is causing it. It breaks at Sheets("Regular Invoice").Range("A29:N29").Copy (According to using the F8 key) Any help is greatly appreciated.
Sub BoxTest()
Dim testRow As Integer
Dim pasteRow As Integer
testRow = 2
pasteRow = 30
Worksheets("Boxes").Select
Do Until Worksheets("Boxes").Range(testRow, 13).Value = 0
Sheets("Regular Invoice").Range("A29:N29").Copy
Worksheets("Regular Invoice").Cells(pasteRow, 1).PasteSpecial xlPasteAll
testRow = testRow + 1
pasteRow = pasteRow + 1
Loop
testRow = testRow + 1
pasteRow = pasteRow + 1
End Sub