Line breaks appear as squares in comments

G

Gustaf

Using Excel 2007, and doing some work in VBA to add comments in certain cells. My problem is that at each line break, there is an outlined square. Have tried vbLf, vbCr, vbCrLf and vbNewLine and they all give the same result.

To be more specific, I use the XML DOM classes to create an XML document with line breaks in, but I don't think that should matter. A sample:

Set objElement = objDom.createElement("value")
objElement.Text = remoteCell.Value
objRoot.appendChild objDom.createTextNode(" ")
objRoot.appendChild objElement
objRoot.appendChild objDom.createTextNode(vbNewLine)

Gustaf
 
J

joel

Make sure Wrapped Cells are enabled.

from worksheet menu
format - Cells - Alignment - Wrap Text

Columns("A").WrapText = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top