2

I am building an Excel add-in with many custom functions. They work fine, however, when I close and reopen the file, all functions are recalculated. Since each custom function makes an API request to my website and the data does not change frequently, I am looking for a way to turn this feature off so that functions do no rerun on file open. I have looked through all the docs but could not find any answers. Really appreciate if someone could help me with this.

My add-in will be used by other users so I am looking for a solution that does not require any extra action from the (like setting the calculation mode of the spreadsheet to manual)

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45

1 Answers1

0

You can set up the manual calculation in the following way:

Application.Calculation = xlCalculationManual 
Application.CalculateBeforeSave = False

The XlCalculation enumeration specifies the calculation mode.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45