Exporting to a txt file without surrounding quotes

D

Dave

I execute the following code. It generates a file called
Report.txt. The resulting file contains the desired
string surrounded by quotes. I would like to eliminate
the quotes surrounding this text. Any suggestions?
Thanks in advance,
Dave

strReport = "ABCD 0012345" & Format(Date(), "mm/dd/yyyy")
SourceFile = "C:\Temp\Report.txt"
On Error Resume Next
Kill SourceFile
FileNumber = FreeFile
Open SourceFile For Output As #FileNumber
Write #FileNumber, strReport
Close #FileNumber
 
D

Douglas J. Steele

Use

Print #FileNumber, strReport

rather than

Write #FileNumber, strReport
 

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