XL.Sheet.SetHorPageBreak
------------------------

Sets/removes a horizontal page break.

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

MBS( "XL.Sheet.SetHorPageBreak"; BookRef; SheetIndex; Row { ; Pagebreak } ) 

**MBS**( **"XL.Sheet.SetHorPageBreak";** /\* Sets/removes a horizontal page break. \*/  
**$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 \*/   
**$Row**; /\* The row for the cell. First row has index 0. \*/   
**$Pagebreak**) /\* Optional; Whether to break or not. Default is 1 for a break.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| 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 |  |
| Row | The row for the cell. First row has index 0. | $row |  |
| Pagebreak | Whether to break or not. Default is 1 for a break. | 0 | Optional |

### Result

Returns OK or error.

### Description

Sets/removes a horizontal page break.  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.GetHorPageBreak](XLSheetGetHorPageBreak.md)
- [XL.Sheet.GetHorPageBreakCount](XLSheetGetHorPageBreakCount.md)
- [XL.Sheet.GetVerPageBreak](XLSheetGetVerPageBreak.md)
- [XL.Sheet.SetVerPageBreak](XLSheetSetVerPageBreak.md)

This function checks for a license.

Created 18th August 2014 , last changed 9th July 2015

  
[XL.Sheet.SetHidden](XLSheetSetHidden.md) - [XL.Sheet.SetLandscape](XLSheetSetLandscape.md)

[HTML Version](XLSheetSetHorPageBreak.shtml)