Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Squares
Whenever i copy text from a text box to a cell, all new lines appear with a
square at the end of it. Anyone know how to stop these squares from appearing. Many thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Squares
I suspect this is because the new lines in the textbox are created with
a carriage return and line feed (CHR(13) & CHR(10)) whereas the Excel cells just use a line feed (CHR(10)). (Although I can't recreate the problem you experience manually.) You can clean out the CHR13s by using Replace e.g. cells("A1") = replace(cells("A1"),vbcr,"") Replace is only available in Excel 2000 and greater. (You can use athe worksheet function replace if you're running XL97). Note however you don't need to do this if you don't copy text and use code such as: Cells(1, 1) = TextBox3.Text to place the text directly in a cell. HTH, Gareth MSL wrote: Whenever i copy text from a text box to a cell, all new lines appear with a square at the end of it. Anyone know how to stop these squares from appearing. Many thanks, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum of squares if condition | Excel Worksheet Functions | |||
chi squares | Excel Discussion (Misc queries) | |||
performing least squares | Excel Programming | |||
removing squares and lines in squares that really should be paragr | Excel Discussion (Misc queries) | |||
Polynomial least squares fit | Excel Programming |