View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Reducing File Size - Turning VBA into txt?

VBA doesn't clean up after itself very well. Removing the code modules and
saving the file seems to stimulate it to remove unwanted clutter it has
accumulated. In Access, (as an example) they have a compress operation to
deal with this problem. In Excel, they don't.

--
Regards,
Tom Ogilvy

"Tim" wrote in message
...
i know people probably see this post now, but i'm just curious... why does
the file size increase so much and how is it solved by deleting /
re-importing the code?

thanks

tim

"Tom Ogilvy" wrote in message
...
in the vbe in the project explorer, write click on your module entry and
choose export. Or choose delete module and accept the offer to export

it
before deleting.

--
Regards,
Tom Ogilvy

"Naoki " wrote in message
...
I'm attempting to reduce the file size of my Excel document, it is
currently at a size of 12.2 Megs. The speed of the document doesn't
really matter, but my company won't be happy to see how big it is,
especially considering the ENTIRE file will be replicated each week.

I
know that the main issue is a number of lengthy macros.

I have read on NUMEROUS matches from googling "excel file size" that
the main way to reduce your document by up to 50% is to go into VBA,
save a module as .txt, delete the module, then bring back the original
code and save normally. The problem I have is with saving the file as
txt. I simply do not have the option of SAVE AS, let alone .txt. In
fact, I dont think I have a way to save the VBA code itself, in effect
I'm really just saving the entire excel file, from within VBA?!?

Maybe
I'm access VBA wrong, but I typically go into Tools-Macros-Visual

Basic
Editor. I am using Office 2k. Anyone know what I'm doing wrong?


---
Message posted from http://www.ExcelForum.com/