Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FileHandling
#1
Solved: 11 Years, 8 Months, 1 Week ago
Hi
I am a QTP beginner.
I wrote some code for file handling and I receive the error message saying "Invalid procedure call or argument" at line 8.
The code is below:
Code:
Dim fso1,file1,file1location
file1location = "c:\textfile.txt"
Set fso1 = createobject("scripting.filesystemobject")
Set file1 = fso1.createtextfile(file1location,true)
file1.write("This is Usha")
file1.write("Rani")
file1.close()
'The error is coming at the following line
Set file1 = fso1.opentextfile("c:\textfile.txt", ForReading, True)
Do while file1.AtEndOfStream<>true
    msgbox file1.readline()
Loop
Can anybody please help me?
Thank you
Reply


Messages In This Thread
FileHandling - by Usha - 07-27-2008, 01:20 AM
RE: FileHandling - by gammaflare - 07-27-2008, 11:42 AM
RE: FileHandling - by Usha - 07-28-2008, 11:25 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)