Where to create the macro to export hierarchy data from MS project to Excel?

R

Richard nian

Hi,

I have found a set of VBA codes that could be used to export hierarchy data
to excel. But if I create the macro in excel, it prompts "User-defined type
not defined" for the row "Dim Proj As Project". if I create the macro in MS
project, it prompts "User defined type not defined" for the row "Dim xlRow
As Excel.Range". Obviously excel don't recognize the object "Project" and MS
project don't recognize the object "Excel". So I don't know where to use
this macro. I am not familiar with VBA, so You help would be greatly
appreciated.

Yours Sincerely
Richard nian
 
S

Steve Rindsberg

Hi,

I have found a set of VBA codes that could be used to export hierarchy data
to excel. But if I create the macro in excel, it prompts "User-defined type
not defined" for the row "Dim Proj As Project".

In the VBA editor, choose Tools, References and add a reference to Project.
Or in Project, add a reference to Excel.

if I create the macro in MS
 
Top