I have some code which all runs perfectly. I needed to expand the code with a For Next Loop, and so added this, but when I run it the workbook just hangs. Have I set it into an endless loop and what do I need to do to prevent that?

I'm still very new to VBA and am adding code through trial and error but am unsure where I'm going wrong...

Added Code

    Dim wb As Workbook
    Dim ws As Worksheet
    Dim varMySheet As Variant
    Dim pt As PivotTable, arr, rng As Range, i As Long, FName
    
    Dim oChart As ChartObject
    Dim mySrs As Series


    For Each ws In ActiveWorkbook.Worksheets
        For Each oChart In ws.ChartObjects
            For Each mySrs In oChart.Chart.SeriesCollection
                mySrs.Formula = WorksheetFunction.Substitute(mySrs.Formula, "[1]", "'My Report'")
            Next
        Next
    Next ws
Many thanks