Click to See Complete Forum and Search --> : Quotation Marks


Juan Cruz
April 10th, 2001, 12:14 PM
Hi everybody!!!
I need some help.
I have to write the quotation mark character in a variable.
For example, the variable value is: hello"world
How can I do that?

Thanks

aknudsen
April 10th, 2001, 12:34 PM
Use two double quotes in a row:

strVar = "Adam said, ""VB is maddening sometimes."""

The value of strVar is Adam said, "VB is maddening sometimes."

dfwade
April 10th, 2001, 01:31 PM
put the code in a bas module and then call like this

Text1 = ReplaceQuote(Text1)


public Function ReplaceQuote(Text as string) as string
ReplaceQuote = Replace(Text, Chr(34), Chr(34) & Chr(34))
End Function