Hi
I have played arounf with this code to try and create aloop
The part I have highlighted in red is where I think I'm going wrong. No error is showing but nothing is happening either

Would anybody have any suggestions on how sort it

Private Sub Newsub()

    Workbooks.Open "J:\2013 Env Review\2013 Db_Dev\Db_Queries\2014_03_20_14_2_41_Output.xlsx", ReadOnly:=True
 
Dim x As Long
Workbooks("MatMacro Test 20140321.xlsm").Worksheets("Cover_Page").Activate
x = 1
Do While Cells(x, 5) <> "" ' THe list of names are in the cover sheet from A5 down
Dim icell2 As String
icell2 = ActiveSheet.Range(Cells(x, 2)).Value
 'This copies the selected data
     Workbooks("2014_03_20_14_2_41_Output.xlsx").Activate ' This is the output file
Workbooks("2014_03_20_14_2_41_Output.xlsx").Worksheets(icell2).Select
    x3 = Application.WorksheetFunction.CountIf(Range("a:a"), ">0") + 1
    x4 = Application.WorksheetFunction.CountIf(Range("1:1"), "<>")
     Range(Cells(2, 1), Cells(x3, x4)).Select
    Selection.Copy
    Workbooks("MatMacro Test 20140321.xlsm").Activate
Workbooks("MatMacro Test 20140321.xlsm").Worksheets(icell2).Select
    Range(Cells(2, 1).Address).Select
    Selection.PasteSpecial Paste:=xlPasteValues
x = x + 1
Workbooks("2014_03_20_14_2_41_Output.xlsx").Close False
Loop
End Sub