ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I delete the end of line (result of shift-enter) (https://www.excelbanter.com/excel-programming/278396-re-how-can-i-delete-end-line-result-shift-enter.html)

Jake Marx[_3_]

How can I delete the end of line (result of shift-enter)
 
Hi Kali,

You need to replace the vbCR (carriage returns) with empty strings when
writing it to a cell:

Sheets("Sheet1").Range("A1").Value = Replace$(txtTest.Text, vbCr, "")

--
Regards,

Jake Marx
www.longhead.com


Kali wrote:
Hello there

I have a form with multilined text boxes, in order to
insert several lines I go "shift-enter", but when I save
it, there is an extra character at the end of each line.
I would really like to get rid of it.

If you could help me, it would be great.

Thanks!
Kali



Kali

How can I delete the end of line (result of shift-enter)
 
Thank you, Jake!
It looks much better now.

Kali.


-----Original Message-----
Hi Kali,

You need to replace the vbCR (carriage returns) with

empty strings when
writing it to a cell:

Sheets("Sheet1").Range("A1").Value =

Replace$(txtTest.Text, vbCr, "")

--
Regards,

Jake Marx
www.longhead.com


Kali wrote:
Hello there

I have a form with multilined text boxes, in order to
insert several lines I go "shift-enter", but when I

save
it, there is an extra character at the end of each

line.
I would really like to get rid of it.

If you could help me, it would be great.

Thanks!
Kali


.


Jake Marx[_3_]

How can I delete the end of line (result of shift-enter)
 
You're welcome, Kali - glad to help!

--
Regards,

Jake Marx
www.longhead.com


Kali wrote:
Thank you, Jake!
It looks much better now.

Kali.


-----Original Message-----
Hi Kali,

You need to replace the vbCR (carriage returns) with empty strings
when writing it to a cell:

Sheets("Sheet1").Range("A1").Value =

Replace$(txtTest.Text, vbCr, "")

--
Regards,

Jake Marx
www.longhead.com


Kali wrote:
Hello there

I have a form with multilined text boxes, in order to
insert several lines I go "shift-enter", but when I save
it, there is an extra character at the end of each line.
I would really like to get rid of it.

If you could help me, it would be great.

Thanks!
Kali


.



All times are GMT +1. The time now is 12:29 PM.

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