Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Check if MS Project is installed using VBA

55 views
Skip to first unread message

MM

unread,
Mar 4, 2003, 11:04:53 AM3/4/03
to
How do check to see if MS Project is installed using VBA

Chip Pearson

unread,
Mar 4, 2003, 11:29:55 AM3/4/03
to
One way is to see what application is associated with MPP files.

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...

0 new messages