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

HOw do I add " into a text string?

Status
Not open for further replies.

Snipor

Programmer
Feb 23, 2001
92
US
Okay guys, I need this string of words to be name a variable. The string is: \SENDER &quot;Web-Legal Update&quot;<dave.clark@web-legal.com>

It has to look exactly like that. Now how do I get the &quot; in the string? I always though you do a simple &quot;&quot;&quot; and it would work.

Here's the way I figured it would work:

Variable = &quot;\SENDER &quot; & &quot;&quot;&quot; & &quot;Web-Legal Updtate&quot; & &quot;&quot;&quot; & &quot;<dave.clark@web-legal.com&quot;

but it doesn't work. Please help.
 
Okay, I figure it out. It's:

Variable = &quot;\SENDER &quot; & &quot;&quot;&quot;Web-Legal Update&quot;&quot;&quot; & &quot;<dave.clark@web-legal.com>&quot;
 
The problem was that you did not &quot;double up&quot; the double quotes.
Variable = &quot;\SENDER &quot; & &quot;&quot;&quot;&quot; & &quot;Web-Legal Updtate&quot; & &quot;&quot;&quot;&quot; & &quot;<dave.clark@web-legal.com&quot;
OR
Variable = &quot;\SENDER &quot;&quot;Web-Legal Updtate&quot;&quot; <dave.clark@web-legal.com&quot;

OR
Variable = Replace(&quot;\SENDER 'Web-Legal Updtate' <dave.clark@web-legal.com&quot;,&quot;'&quot;,&quot;&quot;&quot;&quot;)
 
Hey, thanks for those other ways of doing it. I'll have to remeber that. :)
 
You can also just add Chr(34) to your string.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top