Run Macro on true statement

J

Jack S.

I need a macro to determine if a file is present in
another directory and if so execute another macro
Something like:

If
\path\file.xls = true
Then
Application.Run "Prn"

End If

Thanks
 
S

sp00nix

Code:
--------------------

Sub RunIfPresent()
If Dir("C:\myFile.xls") <> "" Then
Application.Run "Prn"
End If
End Sub

--------------------
 
P

Papou

Hello Jack
If Dir("C:\My Documents\Excel\Tests\file.xls") <> "" Then
macro1
End If

HTH
Cordially
Pascal
 
Top