line break character

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?
 
R

RadarEye

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
 
J

joeeng

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
 
J

JE McGimpsey

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

Top