DIAdem Help

Method: Exists for Sheets

  • Updated2024-09-12
  • 1 minute(s) read

Method: Exists for Sheets

Checks whether a Sheet object with a specific name or index exists.

bExists = Object.Exists(NameOrIndex)
ObjectSheets
Object with this method
NameOrIndexVariant
Specifies the name or the index of the worksheet that is to be checked.
bExistsBoolean
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