analytica
asked on
Replace double quotes in a String
Hi,
How to replace a double quote in VB6.0
I try the code
Replace(sQue, Chr(34), """)
where sQue is of type String
but its not working.
Thanks
How to replace a double quote in VB6.0
I try the code
Replace(sQue, Chr(34), """)
where sQue is of type String
but its not working.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
should be:
Replace(sQue, Chr(34), "")
it's as simple as that.
Replace(sQue, Chr(34), "")
it's as simple as that.
the problem is as Jonothan says....
Temp = Replace(sQue, Chr(34), """)
will work...
Replace DOESNT modify the original string passesd, it only modifies a copy of the same and returns the 'replaced' version.
Temp = Replace(sQue, Chr(34), """)
will work...
Replace DOESNT modify the original string passesd, it only modifies a copy of the same and returns the 'replaced' version.
try
sQue = Replace(sQue, Chr(34), """)
That should work.
Cheers
sQue = Replace(sQue, Chr(34), """)
That should work.
Cheers
Simple, Eazy, perfect solution that i will use:
Let say our variable strString contains the value "Sunny" (A string with quotes around it)
So to remove the quotes:
strString = Replace(strString,Chr(34), "")
Explaination:
strString = Replace(strString, Chr(34), TwoDoubleQuotes)
Hope I helped
Ritesh Khanna
Let say our variable strString contains the value "Sunny" (A string with quotes around it)
So to remove the quotes:
strString = Replace(strString,Chr(34),
Explaination:
strString = Replace(strString, Chr(34), TwoDoubleQuotes)
Hope I helped
Ritesh Khanna
sample: """" & StringVariable & """"