Lets say I have a rich text box..
rtbMessage
all the text in the box is black...
is there anyway to make the last line red.....
rtbMessage.lastline = vbred 'wish it was this easy ;o\
Printable View
Lets say I have a rich text box..
rtbMessage
all the text in the box is black...
is there anyway to make the last line red.....
rtbMessage.lastline = vbred 'wish it was this easy ;o\
this will first check to make sure the last char is not a VBCRLF if it
is the replace it with nothing.
then highlight the last line and mak eit red
Code:RTB1.SelStart = Len(RTB1.Text) - 1
RTB1.SelLength = 1
If RTB1.SelText = vbCrLf Then RTB1.SelText = "" 'check for enter at the end..if it is there..then clear it
x = InStrRev(RTB1.Text, vbCrLf)
Ln = (Len(RTB1.Text) - x) + 1
RTB1.SelStart = x
RTB1.SelLength = Ln
RTB1.SelColor = vbRed
VBBrowser v2.2.4