SelTabCount, SelTabs Properties Example

This example sets the number of tabs in a RichTextBox control to a total of five and then sets the positions of the tabs to multiples of five. To try this example, put a RichTextBox control and a CommandButton control on a form. Paste this code into the Click event of the CommandButton control. Then run the example.

Private Sub Command1_Click()
   With RichTextBox1
      .SelTabCount = 5
      For X = 0 To .SelTabCount - 1
         .SelTabs(X) = 5 * X
      Next X
   End With
End Sub