File size MASSIVE but why?

C

Corey

I have a quite a detailed report (Workbook) that has many macro's within.
On one sheet i have Photo's placed by a Macro into certain cells and sized to suit.

What i have done is run a macro that CLEARS ALL data and ALL Photos from the WorkBook.
This is OK, but i have NOTICED that the WorkBook size is now 56.6MB is size.

Is Excel storing the Images within somehow, although they are deleted?
How can i clear this temporary memory to reduce the file size again?

Corey....
 
M

Mike Fogleman

One suggestion - there is an Add-In called FindLinks by Bill Manville. I
don't have the where to get it, but someone here may know. The reason is one
of my workbooks was bloating in size with continued use. When I ran
FindLinks, there were over 9000 bad links stored in the workbook, and
growing with each use. I found the source was I hyperlinked to websites and
gathered data to a helper sheet so I could update the data in my workbook.
Each time I ran the update, the helper sheet got data from over 200
websites. Here is the issue: the helper sheet was a hidden sheet and Excel
kept a link to it and all the hyperlinked sites, and the list grew with each
update.
The answer was not to keep the helper sheet in the workbook anymore.
When I run an update now, I add a new helper sheet to gather the data, and
then delete the sheet when the update is done.

May be of some help...
Mike F
 
P

Peter T

Hi Corey,
What i have done is run a macro that CLEARS ALL data and ALL Photos from
the WorkBook.

How does your macro do that. IOW does it really delete all photos and not
perhaps merely the delete rows or columns containing them. If that's what
the macro does they will not be deleted, merely made zero tall or zero wide,
effectively invisible.

To delete ALL inserted pictures in the workbook -

For Each ws In ActiveWorkbook.Worksheets
ws.Pictures.Delete
Next

Revert back if you only want to selectively delete pictures (or some other
type of shape), eg only those you 'think' you deleted previously .

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top