johnz
johnz

Reputation: 489

How to get VBA in MS Project to recognize Excel?

Working with VBA in MS Project 2013 Windows 10. I would like to use this declaration:

dim xl as Excel.Application

so I can have early binding on the object and have VBA do code completion and access the Excel library.

Office 2013 is installed, and I'm able to create an Excel workbook, add spreadsheets to it and then add data, but I cannot use the above dim statement until I find a way to add a reference to the Excel library.

When I try to add the Microsoft Excel 15.0 Object Library, which I think is necessary to get what I want, I get an error, "Name conflicts with existing module, project or object library." That library is named "EXCEL.EXE" and I cannot find any other module, project or object library of that name in use on this application.

How do I add the Microsoft Excel 15.0 Object Library into this VBA project? Many thanks in advance!

Update: as requested, a screenshot of the References: enter image description here

Upvotes: 1

Views: 648

Answers (1)

Rachel Hettinger
Rachel Hettinger

Reputation: 8442

Double-check to make sure you didn't name any modules "Excel" like this:Project Explorer window

Upvotes: 1

Related Questions