MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Increased file size after running Excel macros.


Posted by Richard Black on February 27, 2001 4:56 AM

After we run a macro, the excel file grows unusally large in size. It seems like somthing is not being cleaned up. Any help would be appreciated.

Thanks


Posted by David Hawley on February 27, 2001 5:46 AM


Richard,

Here are some methods I have to reduce file size. But are more related to an increase in file size after writing lots of macros. Or a corrupt workbook.


1. Save as "Microsoft Excel Workbook" as apposed to 97/95.

2. Open the VBE and Export all Modules and Forms to your hard drive (right click on them and select Export). Then delete all Modules and Forms in your Workbook. Now Import all Forms and Modules from your hard drive back in.


3.Right Click on any sheet name tab and select "Move or Copy". From the "To book" select "(new book)". Select the "Create a copy" box and click OK. Now save this new book as any name and go to File>Properties|General and see how much the new workbook has increased in size. Do the same for all sheets.

If a sheet causes an unreasonable increase in file size then it is probably corrupt. Try highlight all the data on the sheet and then copy it to a new sheet. If still no change then copy small areas at a time, save and check file size. This will narrow down any corrupt data, which will need re-doing.


Maybe of some use ?

Dave


OzGrid Business Applications