Thread: clearing ranges
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default clearing ranges

The Workbook.Names collection holds all the named ranges used in your workbook.
This clears the cells (contents and formats) and deletes the named range
from the list of names:
Dim N as Name
For Each N in ThisWorkbook.Names
With N.RefersToRange
.ClearContents
.ClearFormats
.Delete
End With
Next N
--
- K Dales


"newnhamm via OfficeKB.com" wrote:

How do I clear or reset all range names once I am finished a procedure?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200512/1