Adding comment text - linefeed visible - why?

W

What-A-Tool

Adding a comment to a cell - no matter what I use for a line feed, I either
end up with a bar or a box displayed in my comment text in the location of
my line feed charecter. I have tried Chr(13), vbNewLine, vbCrLf, all with
the same result.
Can anyone tell me how I can get a line feed in my comment text without the
line feed charecter showing?

Thanks in advance - Sean

Following is my code :

strText = strAuthor & " " & vbCrLf
strText = strText & mstrDayStrt & Format(strDayStart, "h:mm AM/PM")
strText = strText & " " & vbCrLf
strText = strText & mstrDayEnd & Format(strDayEnd, "h:mm AM/PM")

ActiveSheet.Range(strComRng).ClearComments
With ActiveSheet.Range(strComRng).AddComment
.Visible = False
.Text strText
End With

The added spaces are just to get that displayed linefeed charecter away from
my text - makes it look a little better.
 

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