ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   testing file availablity (https://www.excelbanter.com/excel-programming/306273-testing-file-availablity.html)

Maynard

testing file availablity
 
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?

Tom Ogilvy

testing file availablity
 
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

--
Regards,
Tom Ogilvy


"Maynard" wrote in message
...
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?





All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com