Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help: WriteLine can not print doublequote to file

Status
Not open for further replies.

KPharm

Programmer
Feb 1, 2001
38
US
Both of these writelines will fail with the error: Object reference not set to an instance of an object.

FileOpen(1, sFilename, OpenMode.Append)
WriteLine(1, Chr(34))
WriteLine(1, """")
FileClose(1)

Any writeline that I attempt with all characters works just fine. How do we get around this?

Thanks
 
Found the answer: Allow WriteLine to write the commas and quotes for you:

WriteLine(1, Field1, Field2, Field3)

which produces:

"Value1","Value2","Value3"

Kinda neat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top