Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I hope someone can help me ou there. I'm trying to delete all named ranges in all Worksheets, except one named "Connection Data", but I don't seem to having any success. I have pasted my code below. If anyone can enlighten me as to where I'm going wrong, it would be much appreciated. Many Thanks - Grant Sub DeleteRanges() Dim WSh As Worksheet Dim nm As Name '---------------------------- 'Delete All Named Ranges Except Named Ranges "In Connection Data" Workbook '---------------------------- For Each WSh In ThisWorkbook.Worksheets If Not WSh.Name Like "Connection Data" Then For Each nm In ActiveWorkbook.Names nm.Delete Next nm End If Next WSh End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting all named ranges that have a workbook scope | Excel Discussion (Misc queries) | |||
deleting multiple named ranges | Excel Discussion (Misc queries) | |||
problem in deleting the named ranges | Excel Worksheet Functions | |||
Deleting Named Ranges | Excel Worksheet Functions | |||
Deleting many named ranges | Excel Worksheet Functions |