User-defined Type not Defined VBA Issue
Hi Folks
I have some sample code from the web to open an mpp file but I am getting the following error message on the first few lines of code as shown below:
Sub Sample()
Dim appProj As MSProject.Application
Dim aProg As MSProject.Project
Dim wb As Workbook
Dim ws As Worksheet
Error message: User-defined type not defined
I have ticked the Reference to Microsoft Office 14.0 Object Library and I am using Office/Project 2010.
I have also referenced the Microsoft DAO 3.6 Object Library.
Any advice would be appreciated to resolve this issue.
Kind regards
Tony
Post script: Just found the issue, I was missing two References for MS Project.
|