ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   missing chars in a comment box (https://www.excelbanter.com/excel-programming/323944-missing-chars-comment-box.html)

ROland

missing chars in a comment box
 

I have a VBA program where the user can input text in a userform textbox.
This text is copied to the commentbox using 'addcomment(textcomment.text)' .
It works fine when no <enter button is used in the comment text. In the
latter case, a tine square box is displayed (for the linefeed/cr char?)
between the lines were it was pushed.
How can I avoid this square box?
thanks



Tom Ogilvy

missing chars in a comment box
 
sStr = Replace(Textbox1.Text,chr(10),"")

and put sStr into your comment

Assumes xl2000 or later. Post back if you or your users are using xl97.

--
Regards,
Tom Ogilvy


"Roland" wrote in message
...

I have a VBA program where the user can input text in a userform textbox.
This text is copied to the commentbox using 'addcomment(textcomment.text)'

..
It works fine when no <enter button is used in the comment text. In the
latter case, a tine square box is displayed (for the linefeed/cr char?)
between the lines were it was pushed.
How can I avoid this square box?
thanks






All times are GMT +1. The time now is 05:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com