0

I would like to disable automatic calculation on a single sheet. Except that I saw that when you have activated automatic calculation for one sheet, you can not disable automatic calculation for others.

I try to do this code but it does not work.

    Sub EssaiTaux()
 '
 ' EssaiTaux Macro
 '

 '

  Worksheets("EssaiTaux").EnableCalculation = False
  Application.CutCopyMode = False
  ActiveSheet.ListObjects.Add(xlSrcRange, Range("$I$3:$P$18"), ,      xlYes).Name = _
    "Tableau4"
 …
  Range("I17").Select
  ActiveCell.FormulaR1C1 = "Total"
  Sheets("EssaiTaux").Select
  Range("J4").Select
  ActiveCell.FormulaR1C1 = "=+SUMIFS(BASE!C6,BASE!C9,RC9)"
  Range("J5").Select

   End Sub

I would like to apply a formula on only a few cells and a other formula on a particular cell but the automatic calculation mode is already activated with the other sheets.

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
XDSSIOP
  • 91
  • 3
  • 11
  • You should [rewrite your code to avoid `Select`](https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba), and then explicitly specify the sheets on which you want to disable calculation. It looks to me like the assumption that enabling calculation for one worksheet stops you disabling it on others isn't correct. – jsheeran Apr 10 '19 at 12:21
  • Okay, it is a good new so! But I specify the worksheet "Worksheets("EssaiTaux").EnableCalculation = False" but don"t work! – XDSSIOP Apr 10 '19 at 12:34
  • 1
    Application.Calculation = xlCalculationManual ? (for whole workbook) – drgs Apr 10 '19 at 12:44
  • this computer control don't work :( – XDSSIOP Apr 11 '19 at 12:08
  • The only way to do what you are after is to use VBA to do the 'non-automatic' calculations and run this code when you want to do these calculations. –  Jun 06 '19 at 11:47

0 Answers0