FileSystemObject: textfile contents erased
FileSystemObject: textfile contents erased
(OP)
CODE
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(dlgMain.FileName)
Set a = f.OpenAsTextStream(varFileNum)
Set f = fs.GetFile(dlgMain.FileName)
Set a = f.OpenAsTextStream(varFileNum)
Hey guys,
When I open a file as a textstream (Code above) and hit the (X) to close the form and
exit program before using it in the program (Not Graceful exit), It erases the text
in the file and I get a blank file left over. (same name)
Is there something I am not doing at the end. Why does it erase the text in the file?





RE: FileSystemObject: textfile contents erased
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: FileSystemObject: textfile contents erased
RE: FileSystemObject: textfile contents erased
a.close
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: FileSystemObject: textfile contents erased
Thanks for the help, worked great!!!
I had to close both the stream and the file
CODE
Close #varFileNum