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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top