View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter T[_3_] Peter T[_3_] is offline
external usenet poster
 
Posts: 81
Default Removing Range Names

I suspect the reason Chip's routine didn't work for you is
because the names "Print_Area" and "Print_Titles" are
reserved for use with Print setup. These become defined as
worksheet level names, even if you didn't explicitly
create as such. So these names would always exist like
this:

"Sheet1!Print_Area"

Apart from this the basic principle of Chip's sub is, of
course, correct.

Regards,
Peter


-----Original Message-----
Norman's macro works - removes all name ranges, except

for Print_Area
and Print_Titles

Sub RemoveNamesAll() ' change name AllExceptPrint
Dim N As Name
For Each N In ActiveWorkbook.Names
If Not N.Name Like "*Print_*" Then
N.Delete
End If
Next N
End Sub

Course one can modify the ...Like "*Print_"... to keep

other name
ranges.


Chip - your macro still deleted all names ranges, the

Print name ranges
included. So it does not fill ny need.

Thanks for replying

Don Bolstad K9DEB


---
Message posted from http://www.ExcelForum.com/

.