line break character

  • Thread starter Thread starter joeeng
  • Start date Start date
J

joeeng

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?
 
use replace3 to remove the chr10


MyString = replace(MyString,chr(10),"")
 
use replace3 to remove the chr10

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





- Tekst uit oorspronkelijk bericht weergeven -

If you want the linebreak kept use:

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

HTH,

Wouter
 
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
 
vbnewline adds a chr(13) & Chr(10)

RadarEye said:
If you want the linebreak kept use:

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

HTH,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top