Hi,
I want to run some code that will remove all named ranges except the print area from an excel spreadsheet. So far I have this:
But it deletes the print area. Does anybody have any suggestions?
I want to run some code that will remove all named ranges except the print area from an excel spreadsheet. So far I have this:
Code:
Dim nm As Name
On Error Resume Next
For Each nm In ActiveWorkbook.Names
If ActiveWorkbook.Name = "Print_Area" Then Resume Next
nm.Delete
Next
On Error GoTo 0
But it deletes the print area. Does anybody have any suggestions?