Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
other
informationbridge
office.intranets
office.misc
office.setup
office.xml
officeupdate
onenote
photodraw.discussion
powerpoint
producer
proj.standard&server
project
project.developer
project.pro_and_serve
project.server
project.vba
project2000
publisher
publisher.prepress
publisher.programming
publisher.webdesign
visio
visio.createshapes
visio.database.modeling
visio.dev.diagrams
visio.dev.shapesheet
visio.dev.vba
visio.dev.vc
visio.developer
visio.general
visio.installation
visio.printing
visio.software.modeling
visio.troubleshoot
  
 
date: 20 Jan 2006 13:59:20 -0800,    group: microsoft.public.project.vba        back       


PULLING Resource Sheet Data from Project into Excel   
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
date: 20 Jan 2006 13:59:20 -0800   author:   unknown

Re: PULLING Resource Sheet Data from Project into Excel   
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


 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
>
date: Sun, 22 Jan 2006 09:46:40 +1300   author:   Rod Gill rod AT project-systems DOT co DOT nz

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us