-
Hi, ideally you want your addin to be as small as possible so it wont have any adverse affects for your users. Heres some advice extracted from John Walkenbach's Excel 2002 Power Programming with VBA...
FILE SIZE
Excel workbooks (including add-ins) have always suffered from a serious problem:
bloat. You may have noticed that the size of your files tends to increase over time,
even if you don?t add any new content. This is especially true if you delete a lot of
code and then replace it with other code. Making lots of changes to worksheets also
seems to add to file bloat.
If you want to make your add-in?or any workbook, for that matter?as small as
possible, you?ll need to re-create your workbook. Here?s how:
1. Make a backup of your application, and keep it in a safe place.
2. Activate the VBE, and export all the components for your project that contain
VBA code (modules, code modules, UserForms, and possibly ThisWorkbook,
worksheet, and chart modules). Make a note of the filenames and the location.
3. Create a new workbook.
4. Copy the contents of all the worksheets from your original application to
worksheets in the new workbook. Be especially careful if you used named
ranges in your workbook?they must be re-created.
5. Import the components you exported in Step 2.
6. Compile the code.
7. If applicable, reattach any toolbars that were attached to your original workbook.
8. Save the new workbook.
9. Test the new workbook thoroughly to ensure that nothing was lost in the
process.
There?s an excellent chance that the newly created file will be much smaller than
your original. The size reduction depends on many factors, but I?ve been able to
reduce the size of my XLA files by as much as 55 percent with this process.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules