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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OpenTextFile

Status
Not open for further replies.

sfriday

IS-IT--Management
Feb 23, 2002
211
0
0
DE
If I use the OpenTextFile method, how do I close it.

I am opening a file reading from it, I then want to clean up and delete it, currently fails with permission denied as the file is open

Steve
 
Fixed it, I was using a variable for the OpenTextFile IE

Set objinfo = fso_OpenTextFile(blahblahblah)
to clear it I do

Set objinfo = nothing

I can then delete the file
 
Dim FSO
Dim OpenFile
Set FSO = CreateObject("Scripting.FileSystemObject")
Set OpenFile = FSO.OpenTextFile("blablabla")

*\/*
OpenFile.Close
*/\*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top