Remove all define Name

  • Thread starter Thread starter Nimesh
  • Start date Start date
N

Nimesh

I have an excel file that has many defined names (appx more than 100), is
there any way to remove all defined name at one go.
 
Hi,

Right click a sheet tab, view code and paste this in and run it

Sub Kill_Names()
For Each n In ActiveWorkbook.Names
n.Delete
Next n
End Sub

Mike
 
I wouldn't delete all the names in a workbook without some thought.

Excel creates names (usually hidden) when you run certain features. I think
some wrn.* names are created when you use Report Manager. (I've seen them in
other workbooks/worksheets when I never used Report Manager, too.)

I'd get a copy of Jan Karel Pieterse's (with Charles Williams and Matthew
Henson) Name Manager:

You can find it at:
NameManager.Zip from http://www.oaltd.co.uk/mvp

It'll help you decide what you want to do with the name.
 
Hi Mike,
Your macro is working fine. Thanks buddy. I'll try to found out the reason
why its not happening on particular machine. It worked very smoothly on other
machine.
Again thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top