re-calc option


Posted by Bill on February 04, 2002 10:03 AM

I have a spreadsheet that takes forever to calculate. Is there some code that I can put into this particular worksheet that will turn the calculation option to 'Manual' each time this sheet opens?

Posted by Scott on February 04, 2002 12:03 PM

Under "This Workbook" module, put this code:

Private Sub Workbook_Open()
With Application
.Calculation = xlManual
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False

MsgBox ("Calculation set to manual. Please use F9 for calculation")

End Sub

I added a message box to let the user know that the calculation has been set to manual.



Posted by Bill Fantin on February 04, 2002 2:17 PM

Thanks. This is exactly what I was looking for. Can I assume to reverse it upon close that I can just change the 'xlManual' to 'xlAutomatic' on the Befor_Close event?

Appreciate the help.

MsgBox ("Calculation set to manual. Please use F9 for calculation")