XL97: RTF Code Copied to Cell When Using TextRTF Property (171373)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q171373 SYMPTOMS
If you use the TextRTF property for a RichTextBox ActiveX control to
populate a worksheet cell, Rich Text Format (RTF) code may appear in the
cell.
CAUSE
This problem occurs because the TextRTF property returns the text of a
RichTextBox control, including all RTF code, and Microsoft Excel cannot
interpret RTF code that is copied to a cell with a macro. This is true even
though you can manually apply rich text formatting in a worksheet cell.
RESOLUTION
You cannot use the TextRTF property to place the contents of a RichTextBox
control without the RTF code into a worksheet cell. Instead, use the Text
property to return the contents of a RichTextBox control to a worksheet
cell. However, note that the text property does not support rich text
formatting.
REFERENCES
For more information about the RichTextBox control, add a RichTextBox
control to a UserForm, select the control, and then press F1.
| Modification Type: | Minor | Last Reviewed: | 10/10/2006 |
|---|
| Keywords: | kbProgramming KB171373 |
|---|
|