How variable expansion question? How?

G

Guest

I need to use a variable value in a double quoted string.

For example,

Dim strVar As String

strVar = "arg1"
txtFile.WriteLine ("""test.exe""" """strVAR""")

This is not complete code but I think it shows what I'm trying to do
I want the file to contain

"test.exe" "arg1"

including the double quotes.

Can anyone help?
 
M

Marshall Barton

Tec92407 said:
I need to use a variable value in a double quoted string.

For example,

Dim strVar As String

strVar = "arg1"
txtFile.WriteLine ("""test.exe""" """strVAR""")

This is not complete code but I think it shows what I'm trying to do
I want the file to contain

"test.exe" "arg1"

including the double quotes.


txtFile.WriteLine """test.exe"" """ & strVAR & """"
 

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