Cannot concanate output from two richtext boxes

Hi pals,

I know this may sound stupid but i'm unable to concantenate richtext output from two rich text boxes.

For example:

Consider two Richtext boxes: R1 and R2

when I type in code:

R1.rtf & = R2.rtf

R1 appears blank after running the code.

I need help please!




Answer this question

Cannot concanate output from two richtext boxes

  • casey7

    Thanx DMan1. Your tip helped me alot although for these past days i was taking a gruelling course in understanding the rtf format very well.

    Nevertheless, the code lines for a richtextbox e.g. myRTFbox to concantenate RTF(Rich text Format) strings would look like this:

    myRTFbox.select(myRTFbox.TextLength, 0)

    This sets the insertion point at the end of the string. Assignment to the rich text box now will append RTF content to myRTFbox's RTF content.

    Anyway I do express my gratitude with the simple solution you provided.



  • Jon Risbey

    The richtextbox does not like concantenation characters (+ or &) you can however use the selectionstart method to set the insertion point or just use the append text method:

    Me.R1.AppendText(Me.R2.Text)



  • Cannot concanate output from two richtext boxes