?
Solved

Formatting contents of a text box. . . .

Posted on 2003-03-11
6
Medium Priority
?
112 Views
Last Modified: 2010-05-03
I want to remove all extra carriage returns from a text box, but when I do I end up with a "" What is this symbol?  How do I remove it?

Here's my code:

Text = Replace(Text, Chr$(8) & vbCrLf, "")
0
Comment
Question by:adamkushner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 3

Expert Comment

by:Diveblue
ID: 8113491
Text = Replace(Text,vbCrLf, "") should work to remove crlf's but I get the impression you only want to remove crlfs that do not have text before them.

What is the purpose of your use of chr(8)??

can you explain your need in more detail?

thanks,
Scott
0
 

Expert Comment

by:igfp
ID: 8126461
This makes no sence. Char 8 is the backspace! maybe it was char 13! that's the line breaking, Diveblue is right!
0
 

Author Comment

by:adamkushner
ID: 8127823
Yes, I think your correct.  Should have been 13!

Thanks,

Who should get the points?
Diveblue identified the problem, igfp, the answer?


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
Diveblue earned 200 total points
ID: 8128142
I thought I gave you the answer as well
0
 

Author Comment

by:adamkushner
ID: 8128224
Yes, thank you.
0
 

Expert Comment

by:igfp
ID: 8129595
Yes, Diveblue gave you the answer, point go to him! I deserve no credit for changing a char for crying out loud! :p
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question