File Exists Formula
Sorry Larry,
I overlooked the fact that you posted this in worksheet functions. The
solution I gave you would be used in a Macro (Visual Basic). I'm not
exactly sure how to do it in a function.
Maybe something like:
=IF(ISERROR('L:\depts\TechnicalServices\Daily Status Report\History\[IT
Daily Status 061108.xls]Sheet1'!$A$1)=TRUE,"File does not exist!","File
already exists!")
There may be another way to better suit your needs, but that's all I could
come up with right now.
HTH,
Paul
"El Bee" wrote in message
...
Paul,
I'm struggling with the syntax.
I have file on Drive L
In the directory called TechnicalServices
Sub directory called "Daily Status Reports" (space between each word)
File name is MyFile110608.xls.
I have tried your syntax and keep getting an error; "That name is invalid"
here' the text of the formula:
=IF LEN(DIR([\\L:\depts\TechnicalServices\Daily Status Report\History\IT
Daily Status 061108.xls]))
I have tried including quotes but I get the same error; where am I going
wrong?
Thanks for your time and help.
Larry
"PCLIVE" wrote:
I think I've used something like this before.
If Len(Dir([path and Filename])) _
Then
msgbox ("File already exists!")
end
Else:
<Your code
end if
HTH,
Paul
"El Bee" wrote in message
...
Is there a formula that can ba used in a cell to check if a file
exists;
if
the file does exists then do .......
In other languages I've used : If fexists(filename) then .....
|