Im trying to make a word underlined within a string and then add the string to a RichTextBox...
I recive a text and in that string are 2 Chr(31) and i replaces them with the RTF underline commands that you can find in a .rtf file.
When the text got added to the RichTextBox, it shows the "\ul" and "\ulnone" as text!?! How can i get it to show the word underlined?
Code:Public Sub Something(sText as string) sText = Format(sText, vbCFRTF) sText = Replace(sText, Chr(31), "\ul ", , 1) 'This is the start of a underline sText = Replace(sText, Chr(31), "\ulnone ", , 1) 'This is the end of the underline RichTextBox.SelText = sText 'Have alse tried with .SelRTF End Sub




Reply With Quote