Carriage returns and Excel

  • Thread starter Thread starter Jerry Camel
  • Start date Start date
J

Jerry Camel

I created a custom report for a public folder that uses custom forms. For
the most part, it's perfect. Works great. Only thing is that when I stuff
a value from a multi-line textbox into an Excel cell, the carriage returns
within the text show as little boxes (Non-printing char, I'm guessing.)

What's the best way to fix this? Thanks.

Jerry
 
Use Replace() to remove the offending characters (vbCr and vbTab) before you
put the text into the Excel cell. It's e
 
Even with incomplete sentences, you're always helpful. :o)
Works like a charm. But what was the rest of that sentence supposed to be?
 
LOL. Good question. I think I started the extra sentence to tell you what
characters to strip, then just put them in parentheses instead.

FYI, you also need to be careful not to try to put more than 32767
characters in an Excel cell.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top