david_k
09-11-2003, 02:44 AM
Hi All
I am using the FileSystem Object to read each line of a text file with the following code.
Dim fs as Object
Dim a as object
Dim strData as String
Set fs = CreateObject("Scripting.FileSystemObject")
Sat a = fs.OpenTextFile("C:\file.txt")
strData = a.readline
Sometimes (about 1 in every 30 times prog is run) it falls over on the line
Set fs = CreateObject("Scripting.FileSystemObject")
and i get an error "can't create object". The virus software we are using is triggered by this line and i was wondering if this was something to do with it. Am I using the FileSystem Object correctly? Is there another way of creating the object that i should be using?
cheers guys
I am using the FileSystem Object to read each line of a text file with the following code.
Dim fs as Object
Dim a as object
Dim strData as String
Set fs = CreateObject("Scripting.FileSystemObject")
Sat a = fs.OpenTextFile("C:\file.txt")
strData = a.readline
Sometimes (about 1 in every 30 times prog is run) it falls over on the line
Set fs = CreateObject("Scripting.FileSystemObject")
and i get an error "can't create object". The virus software we are using is triggered by this line and i was wondering if this was something to do with it. Am I using the FileSystem Object correctly? Is there another way of creating the object that i should be using?
cheers guys