|
-
Apr 22nd, 2004, 01:33 AM
#1
Thread Starter
Junior Member
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 
Is there a work around for this?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|