ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting Names (https://www.excelbanter.com/excel-programming/309927-re-deleting-names.html)

Rob Bovey

Deleting Names
 
"Mark" wrote in message
...
I am using EXCEL 97.
I have a worksheet with numerous names defined and I want to delete them
all, can some assist with some code which I can use to do this, please?


Hi Mark,

Here's one way to do it. Note that this procedure deletes all defined
names in the currently active workbook, not just names specific to a single
sheet, but I figured that was what you were looking for.

Sub DeleteAllNames()
Dim objName As Excel.Name
For Each objName In ActiveWorkbook.Names
objName.Delete
Next objName
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *





All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com