I need a macro to identify all the named range using external excel files reference to change it to referring back to the active workbook.

Any idea how i can do this?

Because I'm running a macro to copy some sheets into a new workbook, but the named range is all reference to the original workbook. I want to break that link and reference on the active workbook.