Macro file doc takes too long to open

Mary7903

New Member
Joined
Dec 27, 2017
Messages
8
Hello,

My spreadsheet sheet (macro file) has only 12 tabs and a few formulas but it takes ages to open and whenever I modify something it also takes away too long to save. As a result, most of the time Excel crashes - using excel 2010. It seems that the document is huge... is there anything I can do to solve the issue? Thank you
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
It could be a number of reasons but fairly often an unexpectedly large sized spreadsheet is caused by used range issues. If you go to a sheet and press CTRL-END the last cell is way past your actual data. Anyway you could try running this and seeing if the size reduces. It saves the book so makes sure you want that to happen.

Code:
For Each sh In ThisWorkbook.Worksheets
    sh.UsedRange
Next

ThisWorkbook.Save
 
Upvote 0
It could be a number of reasons but fairly often an unexpectedly large sized spreadsheet is caused by used range issues. If you go to a sheet and press CTRL-END the last cell is way past your actual data. Anyway you could try running this and seeing if the size reduces. It saves the book so makes sure you want that to happen.

Code:
For Each sh In ThisWorkbook.Worksheets
    sh.UsedRange
Next

ThisWorkbook.Save


Hi Steve the fish,

Thank you for the above code. At the moment I have this code for each sheet: Sub Home() ThisWorkbook.Sheets("Home").Activate End Sub. Where do I add the code you provided?


Thank you
 
Upvote 0

Forum statistics

Threads
1,215,660
Messages
6,126,085
Members
449,287
Latest member
lulu840

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