View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gustaf Gustaf is offline
external usenet poster
 
Posts: 69
Default Line breaks appear as squares in comments

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