Writing to an external file

G

Guest

Why, when using a write statement to an external file opened in append mode, do I get quotation marks surrounding what I've written? Is there any way to suppress this?

Thank you so much in advance, you guys have perfectly answered my every question.
 
D

Dirk Goldgar

Mark Wipf said:
Why, when using a write statement to an external file opened in
append mode, do I get quotation marks surrounding what I've written?
Is there any way to suppress this?

Thank you so much in advance, you guys have perfectly answered my
every question.

As the help-file entry for the Write statement says, the Write statement
formats the output so that it can be read back in using the Input
statement. That includes, among other things, putting quotes around
string values and inserting commas between the items written. If you
want to avoid this you should probably use the Print statement instead.
 
J

Jonathan Parminter

-----Original Message-----
Why, when using a write statement to an external file
opened in append mode, do I get quotation marks
surrounding what I've written? Is there any way to
suppress this?
Thank you so much in advance, you guys have perfectly answered my every question.
.
Hi Mark,

try this... use tools|references to set a reference to
microsoft scripting runtime.

use the object browser to lookup in the scripting library,
file.OpenAsTextStream

This will possibly give you a bit more control and some
other nice goodies not available in the microsoft office
library.

Luck
Jonathan
 
D

Dirk Goldgar

Jonathan Parminter said:
opened in append mode, do I get quotation marks
surrounding what I've written? Is there any way to
suppress this?
Hi Mark,

try this... use tools|references to set a reference to
microsoft scripting runtime.

use the object browser to lookup in the scripting library,
file.OpenAsTextStream

This will possibly give you a bit more control and some
other nice goodies not available in the microsoft office
library.

But why add all that extra overhead and an extra reference to be
potentially broken, for no more function than is easily available with
the intrinsic VBA I/O statements?
 

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