0
votes

when I create an an "MS Project" object in excel i try to use this code to check if the object was created:

Dim pjapp As Object

Set pjapp = CreateObject("MSProject.Application")

If pjapp Is Nothing Then
    MsgBox "Project is not installed"
End If

I keep getting:

"Run-time error '429': ActivX component can't create object"

although i have a code that suppose to handle this kind of problem.

I searched for a solution but didn't find any. Thanks for the help.

1

1 Answers

0
votes

You don't have any code that handles that error (at least not that you posted). One way is:

Dim pjapp As Object
On Error Resume Next
Set pjapp = CreateObject("MSProject.Application")
On Error Goto 0

If pjapp Is Nothing Then
    MsgBox "Project is not installed"
End If