Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Minimizing/Compressing VB Code in Excel File ...

Hello -

I was wondering if there is a way to somehow reduce the size of the VB
code so that the Excel file gets smaller. I have developed some code
in a template that will be used many times and I would like to reduce
the file size. Is there some way of compressing it? I was thinking
about stripping out all leading tabs/spaces and comments? Is there
anything else I could do?

Thanks!
Joe

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Minimizing/Compressing VB Code in Excel File ...

Another thing to try, which I don't think Rob's utility does, is to
re-create the project, by exporting the modules, and then importing then
into a new workbook. This often reduces the size (but it starts to grow
again as you further develop <g).

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Joe HM" wrote in message
oups.com...
Hello -

I was wondering if there is a way to somehow reduce the size of the VB
code so that the Excel file gets smaller. I have developed some code
in a template that will be used many times and I would like to reduce
the file size. Is there some way of compressing it? I was thinking
about stripping out all leading tabs/spaces and comments? Is there
anything else I could do?

Thanks!
Joe



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Minimizing/Compressing VB Code in Excel File ...

Hello -

Thanks so much for the feedback! I tried Rob's utility and it actually
exports the modules and then re-imports them. That reduced the size of
the file. Then I used it to strip out comments and spaces.

The only thing I noticed is that when I did the export and re-import
AND stripping at the same time, Excel crashed. Weird ...

Thanks again!
Joe

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Minimizing/Compressing VB Code in Excel File ...

Rob Bovey has documented this problem which relates to stripping in class
modules like ThisWorkBook and Sheet modules. It's particularly problematic
in XL97 but I've also had this problem in XL2K (not often).

In Options, check "Ignore code behind document objects when stripping"

Regards,
Peter T


"Joe HM" wrote in message
oups.com...
Hello -

Thanks so much for the feedback! I tried Rob's utility and it actually
exports the modules and then re-imports them. That reduced the size of
the file. Then I used it to strip out comments and spaces.

The only thing I noticed is that when I did the export and re-import
AND stripping at the same time, Excel crashed. Weird ...

Thanks again!
Joe



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook protection impacts file size when compressing a spreadshe Frank Canada Excel Worksheet Functions 0 October 16th 09 09:04 PM
compressing an Excel file tnance New Users to Excel 1 December 17th 05 01:36 PM
Compressing Pictures in Excel Broadband Al Excel Discussion (Misc queries) 0 October 14th 05 12:35 PM
Import VBA Code in Excel-File ? (Export VBA Code to file) Matthias Pospiech Excel Programming 2 March 22nd 05 04:56 PM
Minimizing Excel from a Macro Craig[_15_] Excel Programming 1 May 5th 04 01:34 PM


All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"