ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   check if a file exists / is open (https://www.excelbanter.com/excel-programming/284463-check-if-file-exists-open.html)

Mark Kubicki

check if a file exists / is open
 
what would the code be to check if a file is open and/or exists ?

thanks in advance
mark



Tom Ogilvy

check if a file exists / is open
 
if dir("C:\Myfolder\myfile.xls") = "" then
'doesn't exist
End if


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

"Mark Kubicki" wrote in message
...
what would the code be to check if a file is open and/or exists ?

thanks in advance
mark






All times are GMT +1. The time now is 08:47 AM.

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