Software Developer's Kit - ChemDraw

Send comments on this topic
Color Property
See Also 


Member of ChemDraw Control.Border.

Sets and returns the color of the border line.

Property type

Read-write property


Visual Basic
Public Property Color() As ULong

Return Type



Sets and returns the cell border color as an unsigned long data type. In the example, BottomBorder color is red.


'Declares variables 

 Private Sub cmdCell_Click()
    Dim myTable As ChemDrawControl11Ctl.Table
    Dim myCell As ChemDrawControl11Ctl.Cell
    Set myTable = ChemDrawCtl.selection.Tables.Item(1)
    Set myCell = ChemDrawCtl.selection.Tables.Item(1).Cells.Item(1)
   'returs the border color
    Text1.text = MyCell.BottomBorder.Color
   'sets color, border and width, as in the example
    myCell.BottomBorder.Color = vbRed 
    myCell.BottomBorder.IsDashed = True 
    myCell.BottomBorder.Width = 2 
    myCell.LeftBorder.Color = vbBlue
    myCell.LeftBorder.IsDashed = True 
    myCell.LeftBorder.Width = 2 
    myCell.RightBorder.Color = vbBlue 
    myCell.RightBorder.Width = 2 
End Sub

See Also