| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
XL.Book.SetActiveSheet
Sets an active sheet index in this workbook.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| XL | 3.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "XL.Book.SetActiveSheet"; BookRef; SheetIndex ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| BookRef | The reference number for the workbook. | $ref |
| SheetIndex | The index of the sheet to activate. This number ranges from 0 to XL.Book.SheetCount-1. | 0 |
Result
Returns OK or error.
Description
Sets an active sheet index in this workbook.Examples
Create a sheet and make it active:
Set Variable [ $sheet ; Value: MBS( "XL.Book.AddSheet"; $book; "Sales Receipt") ]
Set Variable [ $r ; Value: MBS( "XL.Book.SetActiveSheet"; $book; $sheet) ]
Set Variable [ $r ; Value: MBS( "XL.Book.SetActiveSheet"; $book; $sheet) ]
See also
This function checks for a license.
Created 18th August 2014, last changed 27th August 2023
MarkDown version: XLBookSetActiveSheet.md