You'd better use:
You should be aware that a workbook contains at least 1 worksheet.Code:Sub snb() on error resume next with getobject(sourceFile) .application.displayalerts=false for each sh in .sheets sh.cells.find("searchstring",,,1).clearcontents if err.number=0 then sh.delete err.clear next .close true end with end sub
So if all worksheets contain the string you are lookinng for, the last sheet will not be removed, but the searchstring will in the code I'm suggesting.
Bookmarks