View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Enter Symbol showing on worksheet from text box entry

an enter key puts in the combination vbCrLf which is Char(13) &
Char(10). The box you see is the Char(13). You can remove it using the
replace command if you are populating your cells with code rather than
linking them (if you are linking them, then remove the link and use code
like below).

Range("B9").Value = Replace(Textbox1.Text,chr(13),"")

Private Sub TextBox1_Change()
Worksheets(1).Range("B9") = Replace(TextBox1.Text, Chr(13), "")
End Sub


Just for interest, this seems to be fixed in Excel 2002.

--
Regards,
Tom Ogilvy

"jennie" wrote in message
...

Hi

I am using Excel 2000.
I have a userform with some textboxes on, quite a lot of text is going
to be entered into them, so i would like the user to be able to change
paragraph.

I have set the textbox EnterKeyBehaviour Property to True this allows
the user to press enter and instead of going onto the next text box, it
starts a new line.
However, here's the problem:
Whenever the enter key is pressed, when the data is stored back onto
the worksheet, or printed, a small empty box symbol is displayed as
enter.

_
Eg. when I change line l_l
I get a box at the end!

Does anyone know how I can stop this from happening, I do not want to
print or show this symbol, but I do want users to be able to change
onto a new line.

Thanks a lot for any help
Jennie


--
jennie
------------------------------------------------------------------------
jennie's Profile:

http://www.excelforum.com/member.php...fo&userid=6706
View this thread: http://www.excelforum.com/showthread...hreadid=266782