disable autocalculation only in one workbook/worksheet

robertkrz

Board Regular
Joined
Apr 25, 2004
Messages
52
Is it possible to disable by VBA autocalculation only in one workbook or worksheet ? For example while opening workbook.
:pray:
Any tips are appreciated !
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
680
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
You can try the followings
Code:
Private Sub Workbook_Open()
    Application.Calculation = xlCalculationManual
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
    Application.Calculation = xlCalculationManual
End Sub

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

GNaga
 

robertkrz

Board Regular
Joined
Apr 25, 2004
Messages
52
Hi,

I came almost to this same conclusion in midtime except that you have also deactivation on change.
Very well. It works fine ! :biggrin:

Thanks a lot !

BTW:
Do you have idea how to compare to dates? One inserted in a form and second one stored as text in a cell.

Thanks in advance.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,493
Messages
5,601,998
Members
414,490
Latest member
Rip181

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
Top