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

Determine if text file is open

Status
Not open for further replies.

orna

Programmer
Apr 2, 2002
314
IL
Hi

I'm using TransferText to import from text file to Access,
the problem starts when it happens the moment the text file
is opened for writing by another system, in this case the
Access closed down with error.
How can i determine if the text file is open?

TIA
[cat2]
 
You can use any of the file routines VBA provides, or you can use the FileSystem object...

Basically attempt to open the text file and trap for errors. If there is an error, then the file is locked.

That's simplistic, I know, but it's basically what you have to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top