Click to See Complete Forum and Search --> : opening files


Alex
November 9th, 1998, 07:35 PM
Trying to open a file, and then append data to it... how can I do this?


So far I have:


Open App.Path & "\output.txt" For Random As #OutputFile Len = Len(MyRecord)


thanks...

Matt
November 25th, 1998, 12:54 PM
There is another way to do what you want but this should work.


Public FileNumber As Integer

Public strFileName As String


Dim strStringToWrite As String


strFileName="c:\folder\name.txt"

strStringToWrite ="Some data"


Open strFileName$ For Append As #FileNumber

Print #FileNumber, strStringToWrite

Close #FileNumber