Replace double quotes (") with single quotes (')
Hi,
I need to replace all the double quotes (") in a textbox with single quotes ('). I used this code:
text= Replace(text, """", "'")
This works fine (for normal double quotes).The problem comes in when you copy a double quote from word and paste it in the text box. What happens is the double quote becomes slanted (“) so my code above can't filter it. I tried to do this:
text= Replace(text, "““","'")
but what happens is that after typing this, vb automatically converts it to the normal double quote ("). I already tried:
text= Replace(text, chr(34), "'") ' 34 is the ascii of double quotes (")
but still, it won't work. I can't seem to find the ascii of the slanted double quotes, they somehow look all the same to me :p
Is there a work around for this?
Thanks.