PC Review


Reply
Thread Tools Rate Thread

Adding comment text - linefeed visible - why?

 
 
What-A-Tool
Guest
Posts: n/a
 
      29th Nov 2006
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.


 
Reply With Quote
 
 
 
 
wisccal@googlemail.com
Guest
Posts: n/a
 
      1st Dec 2006
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.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding text to comment Jock Microsoft Excel Programming 8 29th Sep 2009 01:25 PM
Datagrid - Linefeed in header text Mark B Microsoft ASP .NET 4 4th Jun 2008 02:34 PM
Adding default comment text =?Utf-8?B?ZHNoaWdsZXk=?= Microsoft Excel Misc 1 8th Apr 2005 05:26 PM
Adding a "Linefeed" in a Label/Text Box =?Utf-8?B?RWRkaWUncyBCYWtlcnkgYW5kIENhZmUn?= Microsoft Access VBA Modules 6 1st Mar 2005 12:30 AM
LineFeed/CariageReturn in Label Text dchendrickson Microsoft Access Forms 2 18th Oct 2003 12:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:33 AM.