Software Developer's Kit - ChemDraw

Send comments on this topic
Count Property
See Also 

Description

Default member of ChemDraw Control.Styles

Returns the number of styles in the styles collection.

Property type

Read-only property

Syntax

Visual Basic
Public Property Count() As Long

Return Type

Long

Remarks

Returns the number of styles in the collection of styles.

Example

'Declares variables 
 Dim myStyles As ChemDrawControl11Ctl.Styles
 Set myStyles = ctlChemDraw.Selection.Objects.Styles

 Private Sub cmdStyles_Click()
    'returns the application of the Styles collection
     Text1.text = MyStyles.Application
    'returns the number of Styles in the Styles collection
     Text2.text = MyStyles.Count 
    'sets the Item(1) of the Styles collection 
     myStyles.Item(1).Face = kCDFontStyleBold
 End Sub

See Also