Turning Off Auto Calc

  • Thread starter Thread starter Joe Gieder
  • Start date Start date
J

Joe Gieder

I have this spreadsheet which contains many many
formulas. When a user opens the form it automatically
calculates and causes their machine to lockup for a very
long time. I know you can go into Tools> Options>
Calculation and manually set the calculate to Manual. I
have done this in my file so if it's the first one they
open it wont calculate but if they already have a file
open it does. Is there a way either throug ha macro that
runs as soon as the file is open or VBA code that also
would run before calculating to set the calc to Manual? I
don't know if any of this is possible but any suggestions
would be greatly appreciated.

Thanks In Advance For Your Help
Joe
 
One Way,

Use Alt & F11 to open the VB Editor,
On the left of the screen, double-click 'This Workbook'
in the empty window on the right, enter, (or copy and paste)

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

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

This will set calculation to manual on opening the workbook, auto when
closed. You can still manually change the status quo when ever you want to,
Regards,
 
Thanks Alan. It works great. Is there a way to uncheck
the calculate when saved box at the same time? I may be
pushing it.
Thanks
Joe
 
I found it by using help. I can add
Application.CalculateBeforeSave = False when it opens and
then Application.CalculateBeforeSave = True when it
closes.

Thank you again for the help
Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top