Autocalculation set to manual

Chuck6475

Board Regular
Joined
Sep 30, 2012
Messages
126
2003 / W7

This Userform application has been running for a while. On opening of the workbook it has the statement

Application.Calculation = xlCalculationAutomatic

after which it Opens or Shows the userform.

A couple of times in the last few days the application, even after this open, ended up in "manual calculation" mode. Any ideas on how this could happen? No other Excel spreadsheet open or opened between uses.

I have been using the following routine to set worksheets that would burn cycle times to sleep until needed.

Code:
      For Each wsht In MyArray
          With wsht
              .EnableCalculation = False
        End With
     Next wsht

Where MyArray has the list of worksheets not needed during this phase of the application. This has not been changed since I started the program a month + ago.
 
I don't think your Worksheet.EnableCalculation statements could be the cause of the Application.Calculation being set to Manual.

Macros are often written to set Application.Calculation to Manual at the begining of the code and with a statement to reset to Automatic near the end.
What you describe happens sometimes when the code encounters an unhandled error and never reaches the reset to Automatic line.

It sounds like you're unaware of any code that sets Application.Calculation in your workbook; but you might try doing a text search in the VBE for the phrase "Application.Calculation" across your VBA Project. (Ctrl-F and choose the option button for "Current Project").

The source could also be in a Personal.xlsb file or Add-In.
 
Upvote 0
Hmmm, food for thought.

I've done a search on the Project and there is only one "Application.Calculation" and that is in the opening. It sets it to automatic. Now that said, your point on macros often setting calculation to manual and if they exit abnormally they might not have reset to automatic deserves some exploration. I must say I like that potential better than some random event.

Thanks.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top