- Copy the code.
-
Option Explicit Sub RemNamedRanges() Dim nm As Name On Error Resume Next For Each nm In ActiveWorkbook.Names nm.Delete Next On Error Goto 0 End Sub
- Open any workbook.
- Hit Alt+F11 to open the Visual Basic Editor (VBE).
- On the left, choose a file.
- From the menu, choose Insert-Module.
- Paste the code into the code window at right.
- Hit the save diskette and close the VBE.
- Run the macro by going to Tools-Macro-Macros and double-click RemNamedRanges.
Search This Blog
Tuesday, 11 May 2010
Excel - Remove all named ranges in a sheet
Labels:
Excel