:) thanks Joel, that is exactly what I came up with while poking around..
If Left(Nam, 5) = "=#REF" Then
Nam.Delete
End If
Bernie, I would think that if you deleted a sheet that the names would be
deleted also, but when I go to INSERT-NAME-DEFINE, they are still listed jst
with bad references. This was making other macros I had mess up as it was
still going through old names and giving me bogus values..
This will work for though... Thanks guys!!!
> For Each Nam In ActiveWorkbook.Names
> If Left(Nam.Value, 5) = "=#REF" Then
[quoted text clipped - 18 lines]
> >
> > Thanks in advance
Bernie Deitrick - 28 Nov 2007 19:01 GMT
Sorry - I mis-read your post, and was thinking about the error raised when a block of cells
containing a named range is deleted.
Bernie
MS Excel MVP
> Bernie, I would think that if you deleted a sheet that the names would be
> deleted also, but when I go to INSERT-NAME-DEFINE, they are still listed jst
> with bad references. This was making other macros I had mess up as it was
> still going through old names and giving me bogus values..