Archive of Mr Excel Message Board


Back to Forms in Excel VBA archive index
Back to archive home

Escape Character

Posted by Baje on December 10, 2001 9:11 AM
Hi,
I am using a function Replace that replaces a specified substring with another inside a string. I want to remove double quotes but when I place one in the double quotes in the function it just does not work, it expects another doublw quote. If I use 2 double quotes the function does nothing. Is there an escape character that I could use so that I could get the function to search for double quote characters.

Check out our Excel Resources

Re: Escape Character

Posted by Aladin Akyurek on December 10, 2001 9:26 AM
You can use

CHAR(34)

as the substring that must be replaced.

Aladin

========


Re: Escape Character

Posted by Baje on December 10, 2001 11:19 AM
It isn't working. I am getting an error that the sub/function is not defined. Is there another way?


Re: Escape Character

Posted by Baje on December 10, 2001 11:27 AM
I found the function. It is actually Chr(34). Thank you.


Re: Escape Character

Posted by Aladin Akyurek on December 10, 2001 12:16 PM
Baje --

CHAR is a built-in function in Excel and Chr is I guess an equivalent construct in VBA.

Aladin


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.