Why can't I bind the Scripting object early? I can't seem to find the reference for it! What COM server is it?!
Private Sub Form_Load()
Const ForReading = 1
Set fs = CreateObject("Scripting.FileSystemObject"
Set ts = fs.OpenTextFile("c:\testfile.txt", ForReading, True, TristateFalse)
'See the docs for the textstream object, you can read a line at a time, or all the
'file, or just a few characters
MsgBox "All the file:" & ts.readall
ts.Close
'note you can't write to this file, as it is "For Reading"
End Sub
Private Sub Form_Load()
Const ForReading = 1
Set fs = CreateObject("Scripting.FileSystemObject"
Set ts = fs.OpenTextFile("c:\testfile.txt", ForReading, True, TristateFalse)
'See the docs for the textstream object, you can read a line at a time, or all the
'file, or just a few characters
MsgBox "All the file:" & ts.readall
ts.Close
'note you can't write to this file, as it is "For Reading"
End Sub