Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default line break character

Why does a multiline string value from a form textbox display the linebreaks
{chr(10)} as little squares when saved to a cell? Can these little squares
be suppressed from the cell viewing by using a different ascii character for
the linebreak?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default line break character

use replace3 to remove the chr10


MyString = replace(MyString,chr(10),"")

"joeeng" wrote:

Why does a multiline string value from a form textbox display the linebreaks
{chr(10)} as little squares when saved to a cell? Can these little squares
be suppressed from the cell viewing by using a different ascii character for
the linebreak?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default line break character

On 6 jan, 17:28, Joel wrote:
use replace3 to remove the chr10

MyString = replace(MyString,chr(10),"")



"joeeng" wrote:
Why does a multiline string value from a form textbox display the linebreaks
{chr(10)} as little squares when saved to a cell? *Can these little squares
be suppressed from the cell viewing by using a different ascii character for
the linebreak?- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


If you want the linebreak kept use:

MyString = replace(MyString,chr(10),vbNewLine)

HTH,

Wouter
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default line break character


Joel,
Thanks. It turns out that the linebreak inserted in form textboxes is
chr(13) & chr(10) rather than just chr(10) and the offending character is the
chr(13). So, substituting chr(13) in your suggestion works

"Joel" wrote:

use replace3 to remove the chr10


MyString = replace(MyString,chr(10),"")

"joeeng" wrote:

Why does a multiline string value from a form textbox display the linebreaks
{chr(10)} as little squares when saved to a cell? Can these little squares
be suppressed from the cell viewing by using a different ascii character for
the linebreak?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default line break character


vbnewline adds a chr(13) & Chr(10)

"RadarEye" wrote:

On 6 jan, 17:28, Joel wrote:
use replace3 to remove the chr10

MyString = replace(MyString,chr(10),"")



"joeeng" wrote:
Why does a multiline string value from a form textbox display the linebreaks
{chr(10)} as little squares when saved to a cell? Can these little squares
be suppressed from the cell viewing by using a different ascii character for
the linebreak?- Tekst uit oorspronkelijk bericht niet weergeven -


- Tekst uit oorspronkelijk bericht weergeven -


If you want the linebreak kept use:

MyString = replace(MyString,chr(10),vbNewLine)

HTH,

Wouter



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default line break character

No, vbnewline is platform specific. For instance, on the Mac, it's the
CHR(13) character (ony).

In article ,
joeeng wrote:

vbnewline adds a chr(13) & Chr(10)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? No Name Excel Worksheet Functions 7 October 7th 09 11:10 AM
Corrupted CSV file- '!' character and line break [email protected] Excel Programming 0 February 3rd 07 12:04 AM
Break cell into multiple lines by line break Chia Excel Discussion (Misc queries) 1 August 20th 06 06:37 AM
Parse data where break is a first uppercase character in a string? Glen Excel Worksheet Functions 5 April 16th 06 07:28 PM
How can I use a Macro to set a Page break after a character. the_Bruce Excel Programming 2 August 15th 05 03:39 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"