Run time error '429'

N

Newbie

Hello,
I'm trying to open an Excel file from Project.
In a module of a mpp Project file, the following VBA code runs well.
In another mpp Project file, it generates the "Run time error '429' : An
ActiveX component can't create an object"

Set xlApp = GetObject(, "Excel.Application")
If xlApp Is Nothing Then
Set xlApp = New Excel.Application
End If

Why ???
Thanks for help,

Newbie
 
Top