DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Property: Count for Sheets

Property: Count for Sheets

Returns the number of worksheets in a workbook.

Object.Count
ObjectSheets
Object with this property
Object.CountLongInteger with read access

The following example generates for each worksheet a new channel group. The channel group receives the name of the worksheet and a property which retains the position of the worksheet in the workbook.

Dim i, oCurrSheet, oNewGroup
For i = 1 to Workbook.Sheets.Count
  Set oCurrSheet = Workbook.Sheets(i)
  Set oNewGroup = Root.ChannelGroups.Add(oCurrSheet.Name)
  Call NewGroup.Properties.Add("Description", "Sheet"&oCurrSheet.Index)
Next
In This Section
Was this information helpful?