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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parse field for carriage returns/linefeeds 1

Status
Not open for further replies.

mulligh

Technical User
May 8, 2001
97
US
I have a field that I want to be able to put some type of &quot;marker&quot; in to indicate a carriage return or linefeed. I was thinking of something like <cr>.

So a sample text string might be:

&quot;I want a carriage return <cr> here and also <cr> here&quot;

How can I parse the string to convert the <cr> into a carriage return/line feed in VBA? I know about the vbCrLf command, but am not sure how to put it all together.

Thanks for your help.
 
Here's an example:

MyStr = &quot;I want a carriage return <cr> here and also <cr> here&quot;
MyStr = Replace(MyStr, &quot;<cr>&quot;, vbCrLf)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top