Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why can't I bind the Scripting obje

Status
Not open for further replies.

willrae

Programmer
Sep 13, 2002
22
GB
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
 
The FSO is part of the Microsoft Scripting Runtime library, so add a refernce to that for early binding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top