Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing linebreaks (those 'pesky squares') from text.

Status
Not open for further replies.

IndigoDragon

Programmer
Aug 2, 2005
57
NL
Hi y'all,

[VBA in Excel]

I've been trying to get rid of the explicit linebreak 'characters' from text in cells. Those 'pesky squares'! They're screwing up the text (visually) and my ADO connection only reads data up to those characters.

I've already tried the following:
- Setting 'wrap text' does didly sh?t!
- I tried replacing "vbLf" with " ". This only causes the text to feed 'inline'. The text than acts as if there were no hard returns. However, the small squares are still visible. So, my conclusion is: the squares are no vbLF's. Right!? So, what are they...?
- I've tried replacing "Chr(10)" with " ". This doesn't do anything at all, visually anyway.

Does anyone have any suggestions?
ThanX!
 
Replace vbCr too.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi PHV,

That's it! Ofcourse, vbCr, "carriage return", right!?! Actually, I only need to remove those, this way the text-formatting of the text is kept.

Thanks for your reply!
 
At least, that's what I thought. It turns out that the content of the cells in the third column is simply too long to be passed into the recordset. The special characters actualy don't matter at all!

Anyone know how to passed longer data into the recordset? I don't remember ever having this problem when using ASP/Access. Is it in the difference between ADO and DAO?

Thanx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top