Results 1 to 10 of 10

Thread: change color

Hybrid View

  1. #1
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Jar, Norway
    Posts
    372

    Re: change color

    VB Code:
    1. [B]Dim y As Integer[/B]
    2.     Dim i As Long
    3.     With RichTextBox1
    4.         For i = 1 To Len(.Text)
    5.             If Mid(.Text, i, 2) = "<<" And i > 2 Then
    6.               [B]y = InStrRev(.Text, " ", i - 2)[/B]
    7.                 .SelStart = [B]y[/B]   'i - 2 -
    8.                 .SelLength = InStr(i, .Text, ">>")  -[B] y[/B] + 2
    9.                 .SelColor = vbBlue
    10.                 .SelBold = True
    11.             End If
    12.         Next
    13.     End With
    Is what it should be like.
    Last edited by Ember; Jan 3rd, 2007 at 05:34 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width