Copying text from comments to cells with line feed

  • Thread starter Thread starter khdubya
  • Start date Start date
K

khdubya

I am having trouble finding a way of getting text from comments into a
cell, or even a text box, while preserving the line feeds. Ideally
this would be a UDF, but all of the example ones I can find that do
what I need do not handle line feeds. Any help?
 
This works if you turn on text wrapping in the cell:

Function comment2cell(rTarget As Range) As String
comment2cell = rTarget.Comment.Text
End Function

Note that if rTarget doesn't have a comment or is >1 cell this return
#VALUE.

Co
 
Back
Top