ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Enter Symbol showing on worksheet from text box entry (https://www.excelbanter.com/excel-programming/312631-enter-symbol-showing-worksheet-text-box-entry.html)

jennie

Enter Symbol showing on worksheet from text box entry
 

Hi

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

I have set the textbox EnterKeyBehaviour Property to True this allow
the user to press enter and instead of going onto the next text box, i
starts a new line.
However, here's the problem:
Whenever the enter key is pressed, when the data is stored back ont
the worksheet, or printed, a small empty box symbol is displayed a
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 t
print or show this symbol, but I do want users to be able to chang
onto a new line.

Thanks a lot for any help
Jenni

--
jenni
-----------------------------------------------------------------------
jennie's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=26678


Tom Ogilvy

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





All times are GMT +1. The time now is 02:23 PM.

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