Visual Basic: RichTextBox Control

SelBullet Property Example

This example changes the state of a CheckBox control on a form to show the bullet status of selected text in a RichTextBox control. To try this example, put a RichTextBox control and a CheckBox control on a form. Paste this code into the SelChange event of the RichTextBox control. Then run the example.

  Private Sub RichTextBox1_SelChange()
   If IsNull(RichTextBox1.SelBullet) = True Then
      Check1.Value = vbGrayed
   ElseIf RichTextBox1.SelBullet = True Then
      Check1.Value = vbChecked
   ElseIf RichTextBox1.SelBullet = False Then
      Check1.Value = vbUnchecked
   End If
End Sub