ActiveProject.Resources returns nothing RRS feed

  • Question

  • Hi

    I'm trying to export resource usage from ms project. When I use

    Set rs = ActiveProject.Resources

    There are no resources in rs. ActiveProject.Resources.count = 0

    There are 30 is of them. It seemed to work once but I can't reproduce it. The ActiveProject object seems to have all other information correct.

    What gives?


    Wednesday, October 12, 2011 2:42 PM


All replies

  • kurgaan,

    You've already defined an object (i.t. Set rs = ActiveProject.Resources), so the syntax rs.ActiveProject.Resurces.count has no meaning. I'm surprised you don't get a compile error. Try the following:


    Hope this helps.


    Wednesday, October 12, 2011 3:15 PM
  • John

    Sorry, the "rs." was the end of  one sentence.

    Even if I set a watch to ActiveProject.Resources, the count is zero.  There has to be some setting in Project or Macro security that is causing my code to not see the resources.

    Very frustrating.

    Wednesday, October 12, 2011 3:57 PM
  • Hi,

    Are you connected to a resource pool when doing this? If yes, all resources you "see" don't belong to the activeproject but to the resoruce pool.


    Wednesday, October 12, 2011 4:32 PM
  • But I don't see any resources. The ActiveProject seems to be ok, but the ActiveProject.Resources.Count = 0
    Wednesday, October 12, 2011 5:10 PM
  • Kurgaan,

    As Jan already asked: is your project connected to a resource pool file?

    Do you have any other projects open? If so, close them all and see how many resources there are on the Resource Sheet.

    The resource sheet shows all resources from all open projects and from a resource pool file if you are connected to one.
    So those resources are probably in another file.


    My EPM blog: Projectopolis
    Wednesday, October 12, 2011 7:16 PM
  • Hans

    With only one project open, I copy the resource sheet to excel and there are 1232 resources.

    I don't seem to be using a resource pool. When I click tools->Resource Sharing, Update and refresh resource pool is greyed out.

    Wednesday, October 12, 2011 7:33 PM
  • Hi,

    Does it make a difference if you use ActiveProject.ResourceCount?

    If not, can you try to run following macro:

    Sub FindResources()

        Dim P As Project
        For Each P In Projects
            If P.Resources.Count > 0 Then
                MsgBox P.Resources.Count & " resources found in project: " & P.Name
                Exit Sub
            End If
        MsgBox "No resources found"

    End Sub

    What version of project are you using? Is it up to date with the latest service pack and updates?


    My EPM blog: Projectopolis
    Wednesday, October 12, 2011 7:44 PM
  • Hans

    ActiveProject.ResourceCount = 0

    I ran your code and got a pop-up saying "no Resources found"

    I'm running Project 2007 sp1 on Windows 7 sp1. All updated.

    Could there be some setting in MS Project that would prevent me from reading resources?


    Wednesday, October 12, 2011 7:52 PM
  • Hi,

    Can you please install Service Pack 2 for Project 2007 and try again:

    If that doesn't help, also install the August 2011 CU for Project 2007:

    Does that make a difference?


    My EPM blog: Projectopolis
    Wednesday, October 12, 2011 8:10 PM
  • Hi,

    Meanwhile could I try? Send your file to I'll have a look

    (AT equals @)


    Wednesday, October 12, 2011 8:16 PM
  • Jan

    The Resource view is fully populated but there are no actual resources. Do you know how I can convert what is in the resource view into resources?

    Wednesday, October 19, 2011 3:01 PM
  • Friday, October 21, 2011 1:12 PM