How to insert: " into a string

  • Thread starter Thread starter Torben Laursen
  • Start date Start date
T

Torben Laursen

Hi

How do I insert a: " into a VBA string?

Thanks
Torben Laursen
 
double the double quotes:

"this string ""contains"" double quotes"

from the immediate window (to illustrate):

sStr = "this string ""contains"" double quotes"
? sStr
this string "contains" double quotes
 
If I understand the question correctly, I believe it is done with two
quotation marks when inside a "string."

[A1].Formula = "=CONCATENATE(""First "",""Second"")"

HTH
 
Hi Tom and Dana

Thanks but I must be very slow <g>
What I want is to insert quotes around the string FileName in the code
below;
I don't see how I can do that using double quotes

FileName = Application.GetOpenFilename("VLXE Files (*.XML), *.XML")
If FileName <> False Then
str = "=VLXE_WriteFileIntoDll(" & FileName & ")"
ActiveCell.Offset(rowOffset:=0, columnOffset:=0).Value = str
end if

Thanks
Torben Laursen
 

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

Back
Top