none
EnterpriseResourceGet says argument value is not valid RRS feed

  • Question

  • Hi All, we've followed the good advice of Rod Gill on a couple of posts on this issue.

    We have VBA code that simply wants to call this. We've followed the format, tried various things but still get run time error 1101 the argument value is not valid.

    Also doubled checked the resource guid from the resource centre for this project online tenant and verified we an build a team when we have this project open. But running the code errors out. Here  is the simple test code

    MsgBox Application.ActiveProject.Name
    Application.EnterpriseResourceGet ("f71052f5-2a19-e611-80d9-00155d7c7800")

    We message box to confirm the active project then next line fails. Tried with and without brackets.

    Any help appreciated!



    Wednesday, August 24, 2016 10:28 PM

Answers

  • Ray,

    I don't use Project Server but right off the top it looks like you are trying to use the enterprise resource GUID value instead of the resource Unique ID. Check the syntax for the EnterpriseResourceGet Method in the VB help file.

    John

    Wednesday, August 24, 2016 11:21 PM

All replies

  • Ray,

    I don't use Project Server but right off the top it looks like you are trying to use the enterprise resource GUID value instead of the resource Unique ID. Check the syntax for the EnterpriseResourceGet Method in the VB help file.

    John

    Wednesday, August 24, 2016 11:21 PM
  • thanks John. Ok yes when I add a resource manually to the team and then loop over it and spit out the unique ID i get a value such as 541. The examples on the web used the GUID...

    I'll see if I can find a different field in the project server reporting database (odata) that corresponds.

    thank you

    Ray

    from https://msdn.microsoft.com/en-us/library/office/ff866549.aspx

    expression .EnterpriseResourceGet(EUID, RUID)

    expression A variable that represents an Application object.

    EUID

    Optional

    Variant

    The unique ID of the enterprise resource; required if there is more than one resource.

    RUID

    Optional

    Variant

    The unique ID that will be assigned to the resource in the active project. If omitted, the next valid resource UID is assigned.

    The RUID starts at 1 it seems and is local to the project I'm guessing as that resource I added had an ID of 1

    Wednesday, August 24, 2016 11:25 PM
  • Ok see the field plain old ID in a resource centre view. However the odata feed only gives us the usual ResourceID which is a GUID. that is the identifier we are used to working with so got fooled.

    Now just how to get this ID from a odata feed. Doesn't seem to be there. We can export to excel from the resource centre however want this to be dynamic and scheduled not manual.

    Anyone? :>)

    thanks for confirming the general direction John.

    Ray

    Wednesday, August 24, 2016 11:46 PM
  • Ray,

    Okay, you're welcome and thanks for the feedback. Hopefully someone else will jump in who can talk Server with you.

    John

    Thursday, August 25, 2016 2:44 AM
  • Stuck at the exact same point - I get the UID from the Database, not the odata. And according to the VBA reference I need the Enterprise Unique ID, so... but same error.

    Did you ever resolve this?

    Wednesday, December 12, 2018 2:00 PM