Hi Bernie,
Before you get too ambitious deleting any/all names,
you should be aware that they are usually in use
within worksheet formulas or in VBA coding; otherwise,
I don't think they would have been created in the first place.
Deleting a name that does not exist
ActiveWorkbook.Names("bcd").Delete
would get the error you describe, but I have no idea
how you find the name with the macro and can't delete it.
I don't know of any way to tell if a defined name is
in use within the workbook, and it would be harder
to determine whether macros are using a defined
name. Besides with concatenation to create a
defined name on the fly you wouldn't be able to tell
if a specific defined name is used or would be needed.
For instance defined name ranges are very useful
in VLOOKUP Worksheet Function
http://www.mvps.org/dmcritchie/excel/vlookup.htm
If you delete a name in use you will get results
=SUM(abc) showing 12
after deleting all the names you would get
=SUM(abc) showing #NAME?
Trying to color a range that is no longer there in VBA
and the range might be used only in the VBA code and
not actually in use in worksheet formulas (or conditional formatting).
Range("abc").Interior.ColorIndex = 6
would result in
Run-time error '1004':
Method 'Range' of object '_Global' failed