I had a macro that copied a range of 2 columns and 31 rows from every worksheet in my workbook and pasted them on one worksheet. I tried to revise it to copy more columns on each worksheet but I get the error: "Wrong number of arguments or invalid property assignment." Below is my macro. Can anyone help me fix the error? (The debugger highlights ".Range") Of course, I need it fast. Thank you!
Sub CopyAllSheets()
Dim ws As Worksheet
Application.ScreenUpdating = False
For Each ws In Sheets(Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18"))
With ws
.Range("A2:A31", "B2:B31", "C2:C31", "D2:D31", "E2:E31", "F2:F31", "G2:G31", "H2:H31").Copy
Worksheets("Printout").Range("A" & Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial (xlPasteValues)
End With
Next ws
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Bookmarks