Hi, I am trying to write a simple text file in VB6, using thr FSO. I am using the code below (found in Experts-exchange).
The problem is that my oTS class doesn't have the Writeline (or Close) methods defined. Am I using the incorrect reference?
I have included the Microsoft Scripting Runtime (scrrun.dll) in my references.
Thanks a lot
Dim ReportDir As String
ReportDir = "C:\test"
Dim oFSO As New Scripting.FileSystemObject
Dim oTS As Scripting.File
Dim strRetp As String
Set oTS = oFSO.CreateTextFile(ReportDir & "\myfile.txt", ForWriting, True)
' oTS.WriteLine "text"
Set oTS = Nothing