View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
What-A-Tool What-A-Tool is offline
external usenet poster
 
Posts: 14
Default Adding comment text - linefeed visible - why?

Thought I had also tried vbLF - I was wrong - it worked and did what I
wanted without displaying any unsightly bars or boxes.
Thanks for the tip
Sean


wrote in message
oups.com...
Hi Sean,

Have you also tried Chr(10) or vbLf?

Regards,
Steve

What-A-Tool wrote:
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.