Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to find replace text or symbol with carriage return jo New Users to Excel 11 April 4th 23 10:41 AM
Carriage return symbol - how to split columns at RealGomer Excel Discussion (Misc queries) 6 February 17th 07 02:34 AM
Importing data to excel (newline/carriage return issue) Tandaina Excel Discussion (Misc queries) 7 September 1st 06 03:16 AM
symbol to represent a carriage return chronicles_point Excel Worksheet Functions 3 August 7th 06 09:14 PM
How do I ignore newline character/carriage return while importing Achal Excel Discussion (Misc queries) 6 March 24th 05 02:24 AM


All times are GMT +1. The time now is 09:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"