Rules - Write to File What do each Const mean?
I have a sub routine in my rules to write to file.
It contains a line that says: Const ForReading = 1, ForWriting = 2, ForAppending = 8
What do each one of these do?
Write?
Read?
Append?
I usually use append but it seemed to be placing duplicate items in the file each time I ran it.
Then I tried the write and it only gave me one record.
Thanks!
Here is the entire sub routine:
Sub WriteToFile(txtStringToWrite,FName)
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile("C:\Hyperion\Extracts\" & FName, ForAppending, True)
f.WriteLine txtStringToWrite
f.Close
On Error GoTo 0
End Sub 'WriteToFile