XL.Book.SetCalcMode
-------------------

Sets the current calculation mode.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [10.2](newinversion102.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.Book.SetCalcMode"; BookRef; Mode ) 

**MBS**( **"XL.Book.SetCalcMode";** /\* Sets the current calculation mode. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$Mode**) /\* The new calculation mode.  
Can be 0 for manual, 1 for auto and 2 for auto without data tables.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| Mode | The new calculation mode.   Can be 0 for manual, 1 for auto and 2 for auto without data tables. | 1 |

### Result

Returns OK or error.

### Description

Sets the current calculation mode.  
Can be 0 for manual, 1 for auto and 2 for auto without data tables.  
### Examples

Sets calculation mode to auto:

 Set Variable \[ $r ; Value: MBS ( "XL.Book.SetCalcMode"; $bookRef ; 1 ) \]  
### See also

- [XL.Book.GetCalcMode](XLBookGetCalcMode.md)
- [XL.Book.GetRGBMode](XLBookGetRGBMode.md)
- [XL.Book.SetRGBMode](XLBookSetRGBMode.md)

### Release notes

- **Version 10.2**
    - Added [XL.Book.GetCalcMode](https://www.mbsplugins.eu/XLBookGetCalcMode.shtml) and [XL.Book.SetCalcMode](https://www.mbsplugins.eu/XLBookSetCalcMode.shtml) functions.

### Blog Entries

- [News about the MBS FileMaker Plugin 10.2](https://www.mbsplugins.de/archive/2020-05-19/News_about_the_MBS_FileMaker_P/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.2pr4](https://www.mbsplugins.de/archive/2020-04-20/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th April 2020 , last changed 9th November 2021

  
[XL.Book.SetActiveSheet](XLBookSetActiveSheet.md) - [XL.Book.SetCoreProperty](XLBookSetCoreProperty.md)

[HTML Version](XLBookSetCalcMode.shtml)