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,
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,