View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kevin Kevin is offline
external usenet poster
 
Posts: 504
Default Checking reference for named cells

If I have several named cells in say 10 worksheets, and I delete sheet 8,
then I have some named ranged left out there with no valid reference.

How can I check the validity of a named cell in vba? I have this so far...

Sub test()
Dim Nam As Name
For Each Nam In ActiveWorkbook.Names

"Place code here to check if reference on name is good, if it isnt then
delete that name."

Next Nam
End Sub

Thanks in advance