Results 1 to 2 of 2

Thread: richtextbox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Singapore
    Posts
    116
    hpw do i add in text through my code to the rich text box in a different color
    YC Sim
    Teenage Programmer
    UIN 37903254



  2. #2
    Guest
    Try:

    Code:
    Private Sub Command1_Click()
    
        'Write text in the current color
        RichTextBox1.SelText = "Color 1"
        'Change the color to blue
        RichTextBox1.SelColor = vbBlue
        'Write text in our new color (blue)
        RichTextBox1.SelText = "Color 2"
    
    End Sub

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