How many " (double quotes) do I put around this line so that I end up with ="08075" being pasted into my excel worksheet? The line is:
Response.Write vbTab & ResultSet(8,r)
I need and '=' sign with a single quote before the ResultSet(8,r) with a closing double quote after... I tried:
Response.Write vbTab & "="" & ResultSet(8,r) & """
but that didn't work, plus a couple others but that didn't work, the number of quotes thing always gets me so if someone wants to give me a general rule of thumb on this one I would really appreciate it.
To get a literal double quote (
"
) inside of a string in VBScript, you need to use two double quotes (""
). So for your example:Wouldn't you know, I just cracked it:
Thanks, R.
Double each quote you want to end up in the string. So what you want would be: