foreach bk in workbooks foreach sht in worksheets if sht.name ="" then sht.delete next bk.close savechangs:=truenext