![]() |
How to remove carriage return symbol before importing into excel
I have a VB 2005 application that imports title into excel; how do I
get it to not include the carriage return symbol's this is the code: I this code is in a function and gets called for every line that needs to be included in the title heading. mSubTitle += strFilter & ": " & strSubTitle & vbCrLf I also tried this: mSubTitle += strFilter & ": " & strSubTitle + Chr(13) + Chr(10) When excel opens I get the title and at the end of every line is a small square. How do I make this work? |
How to remove carriage return symbol before importing into excel
Try removing the "Chr(13)". Also, you need to set the cell format to wrap.
mSubTitle = strFilter & ": " & strSubTitle & Chr(10) The purpose of Chr(13) and Chr(10) is usually to include a line feed or hard return. If you don't need that, then remove them both...or just get rid of the Chr(13) or replace it with Chr(10) and format the cell to wrap as mentioned before. HTH, Paul -- "confused" wrote in message ... I have a VB 2005 application that imports title into excel; how do I get it to not include the carriage return symbol's this is the code: I this code is in a function and gets called for every line that needs to be included in the title heading. mSubTitle += strFilter & ": " & strSubTitle & vbCrLf I also tried this: mSubTitle += strFilter & ": " & strSubTitle + Chr(13) + Chr(10) When excel opens I get the title and at the end of every line is a small square. How do I make this work? |
How to remove carriage return symbol before importing into excel
On Mar 12, 2:29*pm, "PCLIVE" wrote:
Try removing the "Chr(13)". *Also, you need to set the cell format to wrap. mSubTitle = strFilter & ": " & strSubTitle & Chr(10) The purpose of Chr(13) and Chr(10) is usually to include a line feed or hard return. *If you don't need that, then remove them both...or just get rid of the Chr(13) or replace it with Chr(10) and format the cell to wrap as mentioned before. HTH, Paul -- "confused" wrote in message ... I have a VB 2005 application that imports title into excel; how do I get it to not include the carriage return symbol's this is the code: I this code is in a function and gets called for every line that needs to be included in the title heading. mSubTitle += strFilter & ": " & strSubTitle & vbCrLf I also tried this: mSubTitle += strFilter & ": " & strSubTitle + Chr(13) + Chr(10) When excel opens I get the title and at the end of every line is a small square. How do I make this work?- Hide quoted text - - Show quoted text - Thanks, Paul I removed Chr(13) and used wraptext = true |
All times are GMT +1. The time now is 06:21 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com