Automatically turn off autocalc when opening specific woorkbook?


Posted by Rick M on March 15, 2001 9:43 AM

Is there a way to turn off the autocalc when opening a specific file. I don't want the user to have to go to tools>options>calculation?



Posted by Dave Hawley on March 15, 2001 11:48 AM


Hi Rick

Yes you can!

Right click on the sheet picture, top left next to "File" and select "View Code", paste in this code:


Private Sub Workbook_Activate()
Application.Calculation = xlCalculationManual
End Sub


Private Sub Workbook_Deactivate()
Application.Calculation = xlCalculationAutomatic
End Sub


Now each time the Workbook is opened or activated calculation will be set to Manual. If the user activates another Excel file in will convert back to Automatic.


Dave


OzGrid Business Applications