Excel Combine All Sheets VBA

Sub Combine()
Const sRANGE = "A1:Z100"
Dim iSheet, iTargetRow As Long, oCell As Object
Dim iTop, iLeft, iBottom, iRight As Long
Sheets(1).Select
Cells.Select
Selection.Clear
iTargetRow = 1
For iSheet = 2 To ThisWorkbook.Sheets.Count: DoEvents
Sheets(iSheet).Select
Range(sRANGE).Select
Selection.Copy
Sheets(1).Select
Cells(iTargetRow, 1).Select
ActiveSheet.Paste
iTargetRow = iTargetRow + Range(sRANGE).Rows.Count
Next
End Sub
Advertisements