I'm running into one problem with this.

My workbook is pretty massive, so I've turned Application.Calculation to
Manual when opening, and only calculate specified areas when necessary
while file is open. (I also have CalculateBeforeSave set to False.) This
works great, except users get annoyed when Calc is still manual once
they've finished using my workbook.

Of course I used a Before_Close event to reset Calc to
xlCalculationAutomatic -- but now it takes forever to close, as it tries to
recalculate the entire workbook before shutting it down. Users just see an
unexplained hourglass that seems to sit there doing nothing. They can
escape by clicking the Close "X" button again, but unless I throw in a
clumsy message box explaining this, most won't know that.

Isn't there a more elegant solution? It seems like a catch-22 -- I want
calculation back on before closing, but I don't want it to actually *
calculate* before closing.

Can I force it to stop calculating within the macro? Is there some other
simple solution I'm not seeing?

It's roundabout, but I also considered opening a new workbook, copying a
Workbook_Close macro into it to turn on calculation, closing my workbook
first, then closing the new Book1 without saving, just to fire the
Workbook_Close event in a workbook that would close quickly. Simple in
concept, but a quick survey of the documentation hasn't shown me a simple
way to copy a macro or module to a new workbook -- if this is the only
solution to my dilemma, could someone point me in the right direction as
far as that goes?

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to