XL.Sheet.SetZoom
----------------

Sets the zoom level of the current view.

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

MBS( "XL.Sheet.SetZoom"; BookRef; SheetIndex; Value ) 

**MBS**( **"XL.Sheet.SetZoom";** /\* Sets the zoom level of the current view. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$SheetIndex**; /\* The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1.e.g. 0 \*/   
**$Value**) /\* The new zoom level.e.g. 150 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| SheetIndex | The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1. | 0 |
| Value | The new zoom level. | 150 |

### Result

Returns OK or error message.

### Description

Sets the zoom level of the current view.   
100 is a usual view.  
### Examples

Set first sheet to 150%:

 Set Variable \[ $r ; Value: MBS ( "XL.Sheet.SetZoom"; $book ; 0; 150 ) \]  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.GetZoom](XLSheetGetZoom.md)
- [XL.Sheet.SetCol](XLSheetSetCol.md)
- [XL.Sheet.SetColPx](XLSheetSetColPx.md)
- [XL.Sheet.SetColumn](XLSheetSetColumn.md)
- [XL.Sheet.SetFooter](XLSheetSetFooter.md)
- [XL.Sheet.SetName](XLSheetSetName.md)
- [XL.Sheet.SetRow](XLSheetSetRow.md)
- [XL.Sheet.SetRowPx](XLSheetSetRowPx.md)
- [XL.Sheet.SetRows](XLSheetSetRows.md)

This function checks for a license.

Created 18th August 2014 , last changed 19th April 2020

  
[XL.Sheet.SetVerPageBreak](XLSheetSetVerPageBreak.md) - [XL.Sheet.Split](XLSheetSplit.md)

[HTML Version](XLSheetSetZoom.shtml)