Carriage returns and Excel

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
 
S

Sue Mosher [MVP-Outlook]

Use Replace() to remove the offending characters (vbCr and vbTab) before you
put the text into the Excel cell. It's e
 
J

Jerry Camel

Even with incomplete sentences, you're always helpful. :blush:)
Works like a charm. But what was the rest of that sentence supposed to be?
 
S

Sue Mosher [MVP-Outlook]

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
 

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