#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 122
Default Range Names

I need a simple way to delete all range names from a source file that I
process. I have no control over the source file. The file has a bajillion
defined names that I'd like to not even know what they are, just delete all.
Must I do them individually, or....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Range Names

Sub DelAllNames()
Dim nm As Name
For Each nm In ActiveWorkbook.Names
nm.Delete
Next
End Sub

Regards,
Peter T

"Glenn" wrote in message
...
I need a simple way to delete all range names from a source file that I
process. I have no control over the source file. The file has a
bajillion
defined names that I'd like to not even know what they are, just delete
all.
Must I do them individually, or....



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Range Names


Sub DeleteNames()
Dim nme As Name

For Each nme In ActiveWorkbook.Names
If nme.Name Like "*_FilterDatabase" Or _
nme.Name Like "*Print_Area" Or _
nme.Name Like "*Print_Titles" Or _
nme.Name Like "*wvu.*" Or _
nme.Name Like "*wrn.*" Or _
nme.Name Like "*!Criteria" Then
Else
nme.Delete
End If
Next nme

End Sub

--
__________________________________
HTH

Bob

"Glenn" wrote in message
...
I need a simple way to delete all range names from a source file that I
process. I have no control over the source file. The file has a
bajillion
defined names that I'd like to not even know what they are, just delete
all.
Must I do them individually, or....



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Range Names

In addition to the other postings you got, you might want to consider that
some (if not all) of those names are used in worksheet formulas... if that
is the case and you delete them, you will break every one of those formulas.

--
Rick (MVP - Excel)


"Glenn" wrote in message
...
I need a simple way to delete all range names from a source file that I
process. I have no control over the source file. The file has a
bajillion
defined names that I'd like to not even know what they are, just delete
all.
Must I do them individually, or....


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Range Names

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



Glenn wrote:

I need a simple way to delete all range names from a source file that I
process. I have no control over the source file. The file has a bajillion
defined names that I'd like to not even know what they are, just delete all.
Must I do them individually, or....


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
converting email address names in a range of cells to real names John Excel Worksheet Functions 1 May 19th 10 03:44 PM
Create range names with names in column heading NigelVII Excel Programming 2 July 29th 08 11:53 AM
COPYING FORMULA CONTAINING NAMES/RELATIVE RANGE NAMES Bricol Excel Discussion (Misc queries) 0 July 8th 08 03:54 PM
Is there a way to give range names (especially with relative reference) for series names and series values in Excel 2007 graphs? [email protected] Excel Programming 0 August 16th 07 02:52 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM


All times are GMT +1. The time now is 01:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"