Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Delete all Range Names Except for 1 Q

I have the following code which deletes all Range Names in a Workbook.
How would I delete all except for 1 Range Name called "MyUsers"

For Each nName In ActiveWorkbook.Names
nName.Delete
Next


Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Delete all Range Names Except for 1 Q

For Each nName In ActiveWorkbook.Names
If nName.Name < "MyUsers" Then
nName.Delete
End If
Next

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Sean" wrote in message
oups.com...
I have the following code which deletes all Range Names in a Workbook.
How would I delete all except for 1 Range Name called "MyUsers"

For Each nName In ActiveWorkbook.Names
nName.Delete
Next


Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Delete all Range Names Except for 1 Q

Thanks Jon

Jon Peltier wrote:
For Each nName In ActiveWorkbook.Names
If nName.Name < "MyUsers" Then
nName.Delete
End If
Next

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Sean" wrote in message
oups.com...
I have the following code which deletes all Range Names in a Workbook.
How would I delete all except for 1 Range Name called "MyUsers"

For Each nName In ActiveWorkbook.Names
nName.Delete
Next


Thanks


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
delete multiple range names mnsue Excel Discussion (Misc queries) 8 January 18th 10 10:41 PM
How to Delete blanks between a range and populate only the names inthe given range Yuvraj Excel Discussion (Misc queries) 2 November 4th 09 08:32 PM
Code to Delete Range Names Sean Excel Programming 3 January 3rd 07 11:05 PM
delete non-used range names TxRaistlin Excel Programming 3 July 19th 06 09:05 AM
Delete Specific Range Names Larry[_11_] Excel Programming 3 December 22nd 03 09:48 PM


All times are GMT +1. The time now is 09:37 AM.

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

About Us

"It's about Microsoft Excel"