I want to run a VBS macro for every .xlsx file in a folder. The macro would delete all name ranges in each file.
I have tested and have working code which deletes all nameranges. ALT + F11 and then inserting a module and hitting F5 to run it, however I want this automated and run for every file in a folder without having to open the xlsx file.
Dim RangeName As Name
On Error Resume Next
For Each RangeName In Names
ActiveWorkbook.Names(RangeName.Name).Delete
Next
On Error GoTo 0
End Sub