Method: Exists for Sheets
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: Exists for Sheets
Method: Exists for Sheets
Checks whether a Sheet object with a specific name or index exists.
bExists = Object.Exists(NameOrIndex)
| Object | Sheets Object with this method |
| NameOrIndex | Variant Specifies the name or the index of the worksheet that is to be checked. |
| bExists | Boolean The value is TRUE if the collection contains an object with the specified name. |
The following example creates the channel group AB_2010 only if the worksheet AB_2010 exists:
If Workbook.Sheets.Exists("AB_2010") Then Call Root.ChannelGroups.Add("AB_2010") End If