PDA

View Full Version : Solved: file size with macro



philfer
03-16-2008, 11:46 AM
Hello,

I have automated a workbook at work using Excel VBA code. However, now the file is 2megs larger.

Is it possible that code can add so much to the size of the file?

I am using VBA to insert some formulas in cells. Could this be the reason it is adding so much size.

Is there a compact and repair selection in excel as there is in access which can bring down the size of the file.

lucas
03-16-2008, 12:26 PM
Bloat does sometimes happen....if it is from the code you can export all of your modules and forms.....delete them from the workbook...save your changes and then import them back into the workbook.

Be sure to do this with a backup copy of your workbook.

Another thing that cause it is a mistake by Excel as to what the used range is. Click here (http://www.vbaexpress.com/kb/getarticle.php?kb_id=83) to see a kb entry by Jake that will help with that. This sounds more like what your problem might be to me but who knows.

Norie
03-16-2008, 12:29 PM
philfer

If you mean the amount of code I thing the answer is no.

However it could be down to what the code actually does.