Re: Append new line to Text File



Ha! -- For Append, not For Output. <g>

--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/

Please reply to the newsgroups so all can participate.




"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx> wrote in
message news:B9OdnbyJ7rTf0GvZnZ2dnUVZ_rOdnZ2d@xxxxxxxxxxxxxx
I would like to append a new line to a text file for example:

somethin somethinsomethin2 some
New Line

How would I go about doing this?

Dim FF As Long
Dim FileNameAndPath As String
Dim NewLineToOutput As String
FileNameAndPath = {fill in with your filename and its path}
NewLineToOutput = "New Line"
FF = FreeFile
Open FileNameAndPath For Output As #FF
Print #FF, NewLineToOutput
Close #FF

Rick


.



Relevant Pages