Excel VBA works only on the last sheet
<p>I have macro below which run an all sheets in workbook and it run through all files in specific directory. But unfortunately it works only for the last sheet in each workbook. It should work for every sheet. Can someone correct my code?</p>

<pre><code>Sub LoopThroughFiles()
    Application.ScreenUpdating = False
    FolderName = "C:\Users\Karolek\Desktop\E\3\"
    If Right(FolderName, 1) &lt;&gt; Application.PathSeparator Then FolderName = FolderName &amp; Application.PathSeparator
    Fname = Dir(FolderName &amp; "*.xls")

    'loop through the files
    Do While Len(Fname)

        With Workbooks.Open(FolderName &amp; Fname)

           ' here comes the code for the operations on every file the code finds

           Call LoopThroughSheets

        End With

        ' go to the next file in the folder
        Fname = Dir

    Loop

End Sub

Sub LoopThroughSheets()

    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets

    Call naprawa

    Next ws
    ActiveWorkbook.Close savechanges:=True
End Sub



Sub naprawa()

    Dim fndList As Variant
    Dim rplcList As Variant
    Dim x As Long

    fndList = Array("Louver-", "Lvrs ", "gauge ", "Galvanized ", "Pieces")
    rplcList = Array("Lvr-", "Louvers ", "ga ", "Glvnzd ", "Pcs")
    For x = LBound(fndList) To UBound(fndList)
    Range("C:C,D:D").Select
    Selection.Replace What:=fndList(x), Replacement:=rplcList(x), LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False

    Next x

End Sub
</code></pre>