Sometimes you have to remove the named ranges from your Excel file, on such scenarios like copy pasted from another workbook or project scope is changed , etc.
It's a tedious task to remove the range names manually.
You can use below code to easily remove all named ranges in Excel file.
nm As Name
On Error Resume Next
For Each nm In ActiveWorkbook.Names
On Error Goto 0