title: VBA - turn on auto calculation AFTER Workbook is closed
body: <p>I have an excel file that automatically disables autocalculation when starting. It's a huge file with lots of rows of data and formulas. 
  I usually filter for what I need and then calculate only the filtered data. </p>
  
  <p>So far so good. When closing the Workbook it automatically enables automatic calculation again, so that it's active when working i different workbooks. </p>
  
  <p>I use these Workbook events to do so</p>
  
  <pre><code>Private Sub Workbook_Open()
  
  Application.Calculation = xlCalculateManual
  Application.CalculateBeforeSave = False
  
  End Sub
  
  
  Private Sub Workbook_BeforeClose(Cancel As Boolean)
  
  Application.Calculation = xlAutomatic
  
  
  End Sub
  </code></pre>
  
  <p>The problem is, that as soon as I hit the X button to close the workbook the Workbook_BeforeClose event starts and the whole file starts to calculate. It takes up to five minutes and only after the calculation is finished, I can save and close the workbook. </p>
  
  <p>I would like to have automatic calculation reactivated AFTER the Workbook is closed, so that excel does not calculate the whole Workbook any longer but that autocalculation is enabled again in any other workbook. </p>
  
  <p>Is there a way to do so? </p>