View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Andy Smith[_2_] Andy Smith[_2_] is offline
external usenet poster
 
Posts: 50
Default Add-In File Size Growing Inexplicably

The best way to "compact" a workbook is to use Tools/Share to share it
without keeping change history (on the Advanced tab), then un-share it again.
If there's VBA in there, you won't be able to get to it until you un-share
it. You might also start Excel empty and go into Design mode before you do
this to prevent any auto-macros.

--
* Please click Yes if this was helpful *
Andy Smith
Senior Systems Analyst
Standard and Poor''s, NYC



"Lazzaroni" wrote:

I've noticed that the size of my add-in (.xla) has been steadily growing,
although the amount of code and number objects contained within the add-in
has not.

I believe that what is happening is that objects that I create and then
delete are not really getting removed from the file. In particular, I create
a temporary worksheet in the add-to store data which I bind to a ListBox
control. I delete this worksheet after the ListBox control is closed.

This reminds me of something that happens to Outlook Personal Folders files
(.pst). When you delete something from a .pst file, such as old emails, they
don't actually get removed from the .pst file unto you compact it. Compacting
occurs automatically under certain circumstances, but there is a way to do it
manually.

Does anyone happen to know if there is a way to "compact" an add-in file? Or
is there some other explanation?

Thanks for your help.