XLA File Size Decrease

  • Thread starter Thread starter Mark Dev
  • Start date Start date
M

Mark Dev

All,

I am currently using Excel XP (SP3) and created a complex Add-In, which I
passed along to another programmer. The other programmer opened the Add-In
and made a very minor VBA code change and then saved the XLA. The file size
of the XLA shrunk from 6MB to 4MB. He is also using Excel XP (SP3). I ran
a Sourcesafe compare on the code modules and they are all identical (with
the exception of the two lines he changed). There are a few hidden
worksheets, that are also unchanged. Does anyone have any idea what would
cause such a huge change in file size?

Thanks,
Mark D'Agosta
 
Charles,

Thanks for you reply. Yes, that appears to be the case. He did not compile
the code, as I always do. I'm unable to locate anything in Microsoft
Support that explains exactly what happens during this Compile process that
makes the files so much larger (other than a brief explanation of how it
does syntax checking, which is the main reason I compile). Do you know
where I can get more details on the Compile process?

The compiled Add-In does not show any noticeable performance improvement, so
I'm wondering what takes place to cause such a huge increase in file size
(4MB to 6MB).

Thanks again,
Mark
 
Mark,

VBA Code is never stored as the plain text you see in the editor.
It is stored as platform/version independent byte-codes, call
OpCodes. These codes are converted to text as you edit the
module. When you compile VBA code, the OpCodes are translated to
platform/version dependent instructions called ExCodes. These
ExCodes are read by the VBA runtime library to carry out the
actions of the code. The reason that a compiled project is larger
is due to the presence of ExCodes.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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

Similar Threads


Back
Top