View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Macro to delete names except Print_Area

Be careful.

Excel creates names that it uses (without your knowledge and without your
permission).

If you delete those names, you could be breaking something that excel needs.

If I were you, 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

You can delete just the names you want pretty easily.

wrote:

I have a macro that deletes all of the named ranges in my workbook. The
problem is that it also deletes the "Print_Area" range, which results
in resetting my print area.

Is there a way to modify this so that it will keep my old print area?

Sub DeleteNames()
'
' Gets rid of all named ranges
'
For Each nName In Names
nName.Delete
Next
'
End Sub


--

Dave Peterson