No I'm pretty sure it was the last block of the excel code...
ws2.Activate
Do While ws2.Cells(iRow, 3) <> ""
iRow = iRow + 1
Loop
ws.Activate
ws.Range("B2:J2").Select
ws.Range("B2:J2").Copy
ws2.Activate
NextRow = ws2.Cells(iRow, 2).Address(RowAbsolute:=False, ColumnAbsolute:=False)
ws2.Range(NextRow & ":J" & iRow).PasteSpecial
ws.Activate
ws.Range("B2:J100").ClearContents
If iRow > 1000 Then
ws2.Activate
ws2.Range("B2:J1001").ClearContents
End If
ActiveWorkbook.Save
Application.DisplayAlerts = True
ActiveWorkbook.Close
So the creation of the second sheet "archived" and that code I believe.
Bookmarks