Public Declare Function FindExecutable Lib "shell32.dll" _
Alias "FindExecutableA" (ByVal lpFile As String, _
ByVal lpDirectory As String, ByVal lpResult As String) As Long
Sub AAA()
Dim FName As String
Dim ExeName As String
Dim Res As Long
ExeName = String(255, " ")
FName = Environ("temp") & "\test.mpp"
Open FName For Output As #1
Close #1
Res = FindExecutable(FName, "", ExeName)
Kill FName
If ExeName Like "*WINPROJ.EXE*" Then
MsgBox "Project Exists"
Else
MsgBox "Project does not exist"
End If
End Sub
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com ch...@cpearson.com
"MM" <memu...@hotmail.com> wrote in message
news:040801c2e267$cb175cd0$3301...@phx.gbl...