missing chars in a comment box

G

Guest

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
 
T

Tom Ogilvy

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.
 

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