I'm trying to copy all rows with data from one sheet into another.
I get a runtime error at the selection.paste line.
Sub move_rows2()
    
    Dim i As Integer, countSheets As Integer, rowCount As Integer
    
    countSheets = Application.Sheets.Count
    
    For i = 1 To countSheets
        Worksheets(i + 1).Select
        Range("A" & Rows.Count).End(xlUp).Select
        rowCount = ActiveCell.Row
        Rows("1:" & rowCount).Select
        Range("A" & rowCount).Activate
        Selection.Copy
        Worksheets(1).Select
        Range("A" & Rows.Count).End(xlUp).Select
        Selection.Offset(2, 0).Select
        Selection.Paste
    Next i
        
End Sub
 
     
    