View Full Version : PULLING Resource Sheet Data from Project into Excel


metaldogo70@gmail.com
01-20-2006, 09:59 PM
I am trying import Resource Sheet data from Project 2000 into Excel
2002. Here's is my code to instantiate my connection between Excel and
Project:

Set objProj = CreateObject("MSProject.Application")
objProj.fileopen "C:\TestData.mpp"

I can get this code to work up to this point, but how do I get
information like the number of resources? I tried the following to see
if it would give me the information that I needed:

Debug.Print objProj.Resources.Count

Doing this gives me Error #438, "Object doesn't support this property
or method."

What do I do? Am I missing something or am I doing this the wrong way?

Thanks!
JR

Rod Gill
01-21-2006, 08:46 PM
Hi,

Try:
Debug.Print objProj.ActiveProject.Resources.Count

The Tasks and Resources containers belong to the project object.

You could also use OLED to read directly from the .mpp file. Read
prjoledb.htm in one of Project's program folders for details.


--

Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more


<metaldogo70@gmail.com> wrote in message
news:1137794360.414449.272090@g14g2000cwa.googlegroups.com...
>I am trying import Resource Sheet data from Project 2000 into Excel
> 2002. Here's is my code to instantiate my connection between Excel and
> Project:
>
> Set objProj = CreateObject("MSProject.Application")
> objProj.fileopen "C:\TestData.mpp"
>
> I can get this code to work up to this point, but how do I get
> information like the number of resources? I tried the following to see
> if it would give me the information that I needed:
>
> Debug.Print objProj.Resources.Count
>
> Doing this gives me Error #438, "Object doesn't support this property
> or method."
>
> What do I do? Am I missing something or am I doing this the wrong way?
>
> Thanks!
> JR
>