Run Macro on true statement

  • Thread starter Thread starter Jack S.
  • Start date Start date
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
 
Code:
--------------------

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

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

HTH
Cordially
Pascal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top