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
 

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

Back
Top