Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have have the below as a start on my why to writing a macro to delete
unused defined names from a workbook. MY question is can a place an if statement where the [New Code] placeholder is to test if the name is currently used in the workbook or refers to a print area? Thanks for the help. Sub DeleteNames() ' ' DeleteNames Macro ' Macro Written 5/12/2005 by MRP ' Dim rng As Range Dim ThisName As Name Msg = "This Macro will delete all Defined Names in this workbook. Are you sure you wish to proceed?" Ans = MsgBox(Msg, vbYesNo) If Ans = vbYes Then For Each ThisName In ActiveWorkbook.Names [New Code] ThisName.Delete Next ThisName End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete defined names | Excel Discussion (Misc queries) | |||
unable to delete Macro names | Excel Discussion (Misc queries) | |||
How to delete all defined names from a workbook? | Excel Worksheet Functions | |||
How to delete all defined names from a workbook? | Links and Linking in Excel | |||
Macro to Finded Defined Names with #REF | Excel Programming |