Thread: Check for files
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
AA2e72E AA2e72E is offline
external usenet poster
 
Posts: 400
Default Check for files

You can use this API:

Declare Function PathFileExists Lib "shlwapi.dll" Alias "PathFileExistsA" (ByVal pszPath As String) As Long

pszPah is the fully qualified name of the file whose exisence you want to check. The result is 0 when the file does not exist.

"Foss" wrote:

Mornin' all,

I have a macro in excel that runs automatically.

I want it to check to see if the trigger file is there
before running.

The process that happens before this saves a text file, if
that text file isn't there, thir proceedure should cancel.

Any ideas?

Thanks for your help!
Foss