double quote as its own string

  • Thread starter Thread starter Craig
  • Start date Start date
C

Craig

I have a replace function that I want to use to go through
a string and replace every instance of whitespace with a
double quote --> ". However, when i use the function as
follows:

replace (tbl1(3), " ", """)

it does not seem to like that. I'm thinking that """ is
not the right way to do that. should it be something like
this:

"'"'" or like this: "~""

please let me know how that works.....thanks for any help.

Craig
 
I have a replace function that I want to use to go through
a string and replace every instance of whitespace with a
double quote --> ". However, when i use the function as
follows:

replace (tbl1(3), " ", """)

it does not seem to like that. I'm thinking that """ is
not the right way to do that. should it be something like
this:

"'"'" or like this: "~""

Either

Replace(tbl1(3), " ", '"')

using ' as a string delimiter instead of ", or double up the
doublequote; two doublequote characters within a doublequote delimited
string are parsed as a single doublequote (how's THAT for
doubletalk!):

Replace(tbl1(3), " ", """")
 
Craig said:
I have a replace function that I want to use to go through
a string and replace every instance of whitespace with a
double quote --> ". However, when i use the function as
follows:

replace (tbl1(3), " ", """)

it does not seem to like that. I'm thinking that """ is
not the right way to do that. should it be something like
this:

"'"'" or like this: "~""

please let me know how that works.....thanks for any help.

Craig

You can do it by "doubling up" the quote mark, like this:

Replace(tbl1(3), " ", """")

Or you can use the Chr() function to return the quote mark, which is
ASCII 34:


Replace(tbl1(3), " ", Chr(34))
 
Back
Top