purge all names

G

Guest

Hi,

I have inherited a workbook with more than 10k defined names, most of which
refer to broken external references. I would like to purge my workbook once
for all of all these links.

I downloaded a utility from http://www.jkp-ads.com/

which is ok. However, I think it would be much easier to simply write a
macro to do the job. I tried the following, which does not work. What am I
doing wrong?


Sub DeleteNames()

For Each nme In ActiveWorkbook.Names

nme.Delete

Next nme

End Sub




In advance, thanks for your help!
 
N

Norman Jones

Hi Henrik,

Try:

'==========>>
Public Sub TestIt()
Dim nme As Name
For Each nme In ActiveWorkbook.Names
nme.Delete
Next nme
End Sub
'<<==========
 

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

Top