testing file availablity

M

Maynard

I've put together a FTP add-in for Excel, but I have a problem with file
availability. Once the file gets FTP-ed, I check for it's existence; then
the code continues once that file is found. Unfortunately, just because the
file exists, doesn't mean it's available to be opened and read. I thought I
could solve this using the FileSystemObject Object, but I couldn't seem to
find anything that would help. Any suggestions?
 
T

Tom Ogilvy

the code in these articles do a low level opening of the file with exclusive
access I believe. Perhaps you could use that to test if it is available to
be opened and read.

http://support.microsoft.com?kbid=138621
XL: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=291295
XL2002: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=213383
XL2000: Macro Code to Check Whether a File Is Already Open

http://support.microsoft.com?kbid=184982
WD97: VBA Function to Check If File or Document Is Open
 
Top