ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Turn off/on auto calc when entering or leaving a specific workshee (https://www.excelbanter.com/excel-programming/385693-turn-off-auto-calc-when-entering-leaving-specific-workshee.html)

Rominall

Turn off/on auto calc when entering or leaving a specific workshee
 
This is probably a really easy thing but I can't figure it out.
I need to turn auto calc except tables when a user goes to worksheet PIVOT
and turn it back to full auto calc when they exit.

I've tried on SheetActivate with the following code.
With Application
.Calculation = xlSemiautomatic
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False

But the pivot table will still auto calc. Maybe I'm not understanding the
settings.

End result is that with FULL auto calc turned on a few macros that
add/remove pivot table fields don't work properly so the auto calc shouldn't
happen.

Jim Rech

Turn off/on auto calc when entering or leaving a specific workshee
 
The "tables" referred to are data tables not pivot tables so this option
will not help you.

You can control whether an entire sheet calculates using the sheet's
EanbleCalculation property. I assume this would affect pivot tables on the
sheet but I'm not sure.

--
Jim
"Rominall" wrote in message
...
| This is probably a really easy thing but I can't figure it out.
| I need to turn auto calc except tables when a user goes to worksheet PIVOT
| and turn it back to full auto calc when they exit.
|
| I've tried on SheetActivate with the following code.
| With Application
| .Calculation = xlSemiautomatic
| .MaxChange = 0.001
| End With
| ActiveWorkbook.PrecisionAsDisplayed = False
|
| But the pivot table will still auto calc. Maybe I'm not understanding the
| settings.
|
| End result is that with FULL auto calc turned on a few macros that
| add/remove pivot table fields don't work properly so the auto calc
shouldn't
| happen.




All times are GMT +1. The time now is 03:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com