PC Review


Reply
Thread Tools Rate Thread

Add-In File Size Growing Inexplicably

 
 
=?Utf-8?B?TGF6emFyb25p?=
Guest
Posts: n/a
 
      7th Mar 2007
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.

 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      7th Mar 2007
You should probably not allow changes to the add-in. Otherwise it will be
difficult to track versions, and this kind of problem may keep happening.
Add a workbook, hide it, use it for any scratch data you need, and delete
it.

If you need to persist information from one session to the next, use a
workbook or text file in the same directory as the add-in, or use the
registry. This separates user data and settings from the code, so you can
change one without destroying the other.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Lazzaroni" <(E-Mail Removed)> wrote in message
news:68EFB51E-83B9-45EC-B79A-(E-Mail Removed)...
> 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.
>



 
Reply With Quote
 
=?Utf-8?B?QW5keSBTbWl0aA==?=
Guest
Posts: n/a
 
      12th Mar 2007
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.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File size growing growing exponentially Steve Microsoft Excel Misc 6 24th May 2009 06:29 PM
File size growing growing exponentially Steve Microsoft Excel Misc 0 24th May 2009 08:31 AM
Re: Database Growing Inexplicably Large Tony Toews Microsoft Access 0 30th Sep 2003 10:09 PM
Database Growing Inexplicably Large Bright_Anarchy Microsoft Access 0 30th Sep 2003 08:23 PM
Database Growing Inexplicably Large Tarpon_Zeke Microsoft Access 0 30th Sep 2003 08:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:43 PM.