![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com