Files saves slowly after running macro

rdw72777

Well-known Member
Joined
Apr 5, 2005
Messages
723
I have a file, about 15 megs total, that i run a macro on each month. the macro does a lot of stuff but nothing earth shattering (create variables to be used in code, creates pivots, does some matches, replaces data inserts rows, copies and pastes data, etc.) and the macro itself takes about 40 minutes to run.

The weird thing is, after I run the macro, I then do a few manual things and save the file. The file takes around 10 minutes to save, but does eventually save. However, any subsequent time I save the file, it only takes about 10 seconds.

Curious, is there any code i could put at the end of the macro that would maybe clean up Excel so the save wouldn't take so long. I publish this macro and when others use it this save time frustrates people and they kill Excel before letting it save, costing them the 40 minutes the macro took to run. Even if I tell people it takes a while to save after the macro, they don't listen.

Is the type of work my macro does grabbing and holding memory or CPU processing power? is there code where I could cause that to be handled at the end of my macro.

Thanks,
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Forum statistics

Threads
1,224,588
Messages
6,179,743
Members
452,940
Latest member
rootytrip

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