Software Developer's Kit - ChemDraw

Send comments on this topic
Count Property
See Also 

Description

Member of ChemDraw Control.Captions

Returns the number of captions in the captions collection.

Property type

Read-only property

Syntax

Visual Basic
Public Property Count() As Long

Remarks

The property Count returns the number of captions in the collection

Example

'Declares variables 
 Dim myCaptions As ChemDrawControl11Ctl.Captions
 
Set
myCaptions = ctlChemDraw.Selection.Objects.Captions

 Private Sub cmdCaptions_Click()
    'returns the application of the Captions collection
     
Text1.text = MyCaptions.Application 
    'returns the number of Captions in the Captions collection
     Text2.text = MyCaptions.Count
    'sets the Item(1) of the Captions collection   
     
myCaptions.Item(1).CaptionFace = 2
    'returns the face  of the caption 
     Text3.text = MyCaptions.Item(1).CaptionFace
 End Sub

See Also