MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Reference / Range hidden...Must find...Must Kill!


Posted by bill on October 24, 2001 6:12 AM

Hello,
I've a hand-me-down XLS that has a refernece within a sheet that only exposes itself when I copy the sheet to a new sheet.

In other words, I copy this sheet as a new sheet within same workbook and am prompted about how to deal with this "hidden" object?

How to find? How to kill!!!!

Thank you kindly:)


Posted by bill on October 24, 2001 6:45 AM

Re: Twisted Details!!!

I found code that does the trick.

Using the code, I've found that the references I want to kill actually reside in CUSTOM REPORT VIEWS.

Now, I didn't write these VIEWS and sure would like to kill them.

My WBook hhas many sheets hidden and no hidden.

Would be nice to iterate though CUSTOM REPORTS and kill them all.

Thanks...

Posted by George Camsell on October 24, 2001 8:30 AM

Re: Twisted Details!!!


Try this :-

Sub Delete_All_CustomViews()
Dim view As Object, wb As Object
Set wb = ActiveWorkbook.CustomViews
For Each view In wb
wb(view.Name).Delete
Next
End Sub