ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run Macro on true statement (https://www.excelbanter.com/excel-programming/306523-run-macro-true-statement.html)

Jack S.

Run Macro on true statement
 
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

sp00nix[_18_]

Run Macro on true statement
 

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

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

--------------------





---
Message posted from http://www.ExcelForum.com/


Papou

Run Macro on true statement
 
Hello Jack
If Dir("C:\My Documents\Excel\Tests\file.xls") < "" Then
macro1
End If

HTH
Cordially
Pascal

"Jack S." a écrit dans le message de
...
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





All times are GMT +1. The time now is 02:52 AM.

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