I am using the FileSystemObject to modify a text file. The line I am adding needs quotes. I have tried the following with the described result.
filetext.WriteLine("iSyntaxServer = '"129.168.128.10'")
and
filetext.WriteLine("iSyntaxServer = "192.168.128.10"")
both result in "Expected ')' on line 29"
How do I add quotes?
Writing a line in a file with quotes
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- jimbo101974
- Posts: 40
- Last visit: Mon Jan 12, 2009 4:52 am
Writing a line in a file with quotes
I am using the FileSystemObject to modify a text file. The line I am adding needs quotes. I have tried the following with the described result.
filetext.WriteLine("iSyntaxServer = '"129.168.128.10'")
and
filetext.WriteLine("iSyntaxServer = "192.168.128.10"")
both result in "Expected ')' on line 29"
How do I add quotes?
filetext.WriteLine("iSyntaxServer = '"129.168.128.10'")
and
filetext.WriteLine("iSyntaxServer = "192.168.128.10"")
both result in "Expected ')' on line 29"
How do I add quotes?
Writing a line in a file with quotes
Use the CHR function.filetext.WriteLine "iSyntaxServer = " & CHR(34) & "129.168.128.10" & CHR(34)