View Single Post
 
Old 06-19-2014, 12:41 PM
Cosmo Cosmo is offline Windows Vista Office 2007
Competent Performer
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

Quote:
Originally Posted by jpb103 View Post
Code:
Dim oRng as Range
Set oRng = DescriptionBox.TextRTF
oRow.Cells(1).Range.FormattedText = oRng
Code:
oRow.Cells(1).Range.FormattedText = DescriptionBox.TextRTF
These two code segments perform exactly the same operation. Setting oRng is redundant to the logic.
DescriptionBox.TextRTF is a String
oRng is a Range

The first cannot work, as you cannot set a range variable to a string.

The second might work, assuming that the .Range.FormattedText accepts a string of formatted text (which is what you see).
Reply With Quote