Selection.Replace What and double quotes

E

Ed Peters

Hi all,

I need to replace double quotes " with nothing.

However the code below does not work for double quotes.

Selection.Replace What:=""", Replacement:=""

Any ideas?

Thanks,

Ed
 
R

Rick Rothstein \(MVP - VB\)

Change your What value to this...

What:=""""

There are 4 quote marks after the equal sign.

Rick
 
E

Ed Peters

Change your What value to this...

What:=""""

There are 4 quote marks after the equal sign.

Rick










- Show quoted text -

Thanks but that does not work. I can replace any other character but
not "...
Ed
 
G

Guest

When I have problems with double quotes there is always one method that works

What:= chr(34) ' one quote
or
What:= chr(34) & chr(34) 'two quotes
or
What:= chr(34) & chr(34) & chr(34) 'three quotes
 
R

Rick Rothstein \(MVP - VB\)

I need to replace double quotes " with nothing.
Thanks but that does not work. I can replace any other character but
not "...

Did your line look like this...

Selection.Replace What:="""", Replacement:=""

....four quotes for the What and two quotes for the Replacement? When I tried
that line, it worked on my system.

Rick
 
E

Ed Peters

Did your line look like this...

Selection.Replace What:="""", Replacement:=""

...four quotes for the What and two quotes for the Replacement? When I tried
that line, it worked on my system.

Rick- Hide quoted text -

- Show quoted text -

Thanks sorted it now, I need all the other default options included in
the selection.replace for it to work.

Ta

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top