What causes file size to suddenly grow??

ElEdwards

Board Regular
Joined
Aug 29, 2002
Messages
220
I'm using Win2000 and Excel2000.

I have a couple of workbooks I use at work, several smaller workbooks feeding off of one master workbook.

The normal filesize of the master workbook is around 200K....but the other day, after making a couple of modifications and saving it, the filesize grew to 4Megs and I couldn't open it anymore.

Luckily, I had a backup....but what causes this? Thanks :)
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
A lot of things can do it.

A lot of complex formulas, applying formatting to unnecessry ranges, etc.

Check out http://www.decisionmodels.com/optspeedb.htm for some tips.

There's also this bit of code that will help reduce bloat:

<font face=tahoma><SPAN style="color:#00007F">Sub</SPAN> WorkbookReducer()
    <SPAN style="color:#007F00">'From: http://www.contextures.com/xlfaqApp.html#Unused</SPAN>
    <SPAN style="color:#007F00">' Re-set used range</SPAN>
    
    <SPAN style="color:#00007F">Dim</SPAN> myLastRow <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
    <SPAN style="color:#00007F">Dim</SPAN> myLastCol <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>
    <SPAN style="color:#00007F">Dim</SPAN> wks <SPAN style="color:#00007F">As</SPAN> Worksheet
    <SPAN style="color:#00007F">Dim</SPAN> dummyRng <SPAN style="color:#00007F">As</SPAN> Range
        
        <SPAN style="color:#00007F">For</SPAN> <SPAN style="color:#00007F">Each</SPAN> wks <SPAN style="color:#00007F">In</SPAN> ActiveWorkbook.Worksheets
            <SPAN style="color:#00007F">With</SPAN> wks
                myLastRow = 0
                myLastCol = 0
                <SPAN style="color:#00007F">Set</SPAN> dummyRng = .UsedRange
                <SPAN style="color:#00007F">On</SPAN> <SPAN style="color:#00007F">Error</SPAN> <SPAN style="color:#00007F">Resume</SPAN> <SPAN style="color:#00007F">Next</SPAN>
                myLastRow = _
                    .Cells.Find("*", after:=.Cells(1), _
                    LookIn:=xlFormulas, lookat:=xlWhole, _
                    searchdirection:=xlPrevious, _
                    searchorder:=xlByRows).Row
                    myLastCol = _
                    .Cells.Find("*", after:=.Cells(1), _
                    LookIn:=xlFormulas, lookat:=xlWhole, _
                    searchdirection:=xlPrevious, _
                    searchorder:=xlByColumns).Column
                <SPAN style="color:#00007F">On</SPAN> <SPAN style="color:#00007F">Error</SPAN> <SPAN style="color:#00007F">GoTo</SPAN> 0
                
                <SPAN style="color:#00007F">If</SPAN> myLastRow * myLastCol = 0 <SPAN style="color:#00007F">Then</SPAN>
                        .Columns.Delete
                    <SPAN style="color:#00007F">Else</SPAN>
                        .Range(.Cells(myLastRow + 1, 1), _
                        .Cells(.Rows.Count, 1)).EntireRow.Delete
                        .Range(.Cells(1, myLastCol + 1), _
                        .Cells(1, .Columns.Count)).EntireColumn.Delete
                <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
            <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
        <SPAN style="color:#00007F">Next</SPAN> wks

<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN>
</FONT>

Hope that helps,

Smitty
 
Upvote 0
That's works if the file is still open but....

What happened was I made a few cosmetic changes to the look of the sheet, saved it and closed it. Later when I tried to open it again, it wouldn't open....that's when I opened Explorer and saw the filesize. I have a feeling that I'm past the point of no return in an instance like this.
 
Upvote 0

Forum statistics

Threads
1,215,217
Messages
6,123,673
Members
449,116
Latest member
HypnoFant

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top