XL.Sheet.SetTabColor
--------------------

Sets the color for the sheet's tab.

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

MBS( "XL.Sheet.SetTabColor"; BookRef; SheetIndex; Color ) 

**MBS**( **"XL.Sheet.SetTabColor";** /\* Sets the color for the sheet's tab. \*/  
**$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 \*/   
**$Color**) /\* The color value to use. \*/ 

### 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 |
| Color | The color value to use. |  |

### Result

Returns OK or error.

### Description

Sets the color for the sheet's tab.  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.GetTabColor](XLSheetGetTabColor.md)
- [XL.Sheet.GetTabColorRGB](XLSheetGetTabColorRGB.md)
- [XL.Sheet.SetColPx](XLSheetSetColPx.md)
- [XL.Sheet.SetTabColorRGB](XLSheetSetTabColorRGB.md)

### Release notes

- **Version 9.1**
    - Fixed problem with [XL.Sheet.SetTabColorRGB](http://www.mbsplugins.eu/XLSheetSetTabColorRGB.shtml) function.

This function checks for a license.

Created 22nd April 2017 , last changed 22nd April 2017

  
[XL.Sheet.SetRows](XLSheetSetRows.md) - [XL.Sheet.SetTabColorRGB](XLSheetSetTabColorRGB.md)

[HTML Version](XLSheetSetTabColor.shtml)