Clean up a string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a long string that includes paragraph marks from Word, which I guess
are carriage returns. Does someone have a function I can use to strip these
out of my string?

TIA
 
Replace(sStr,chr(10),"")

replace chr(10) with whatever character(s) you are trying to remove.

However, in my test, chr(10) is the correct character for your situation.
 
Another way:

clnStr = Application.WorksheetFunction.Clean(dirtyStr)

Sharad
 

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

Back
Top