What am I doing wrong here?
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Const StrPad4 = " ", StrPad3 = " ", StrPad2 = " ", StrPad10 = " " ' these are to use to pad strings that are not used
Dim fs, f, ts, s
strFileName = strDirectory & "test1.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
Set s = fs.CreateTextFile(strFileName) 'Create a file
Set f = fs.GetFile(strFileName)
Set ts = f.OpenAsTextStream(ForWriting, TristateUseDefault)
It crashes on the last line.
IS there a good place to learn this code on the web?
Thanks



