View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
Dawg House Inc Dawg House Inc is offline
external usenet poster
 
Posts: 22
Default Out of Control File Size

An update on the solution - the sample below will delete all Rectangles,
Lines and Pictures on all sheets in a given workbook. To delete other object
types, simply add a line within the do loop like this:
Sheets(i).<objectname.Delete

Good luck.
JCH
~~~

Sub Delete_All_Objects()
Dim i, j As Integer
j = Sheets.Count
i = 1
Do Until i j
Sheets(i).Rectangles.Delete
Sheets(i).Lines.Delete
Sheets(i).Pictures.Delete
i = i + 1
Loop

End Sub
--
Dawg House Inc.
"We live in it, therefore, we know it!"