none
Replacing Resources in Microsoft Project Professional 2010 using VBA RRS feed

  • Question

  • I would like to replace Resource name, programmatically using VBA, with any of the resources available on the Enterprise Resource Pool in MS Project Professional 2010.

    I can do it manually in MS Project by going to the Resource tab, then selecting Build Team from Enterprise to open the Filter Enterprise Resources form, on which:

    I tick Resource Name checkbox, select "contains" from the dropdown box adjacent to it, enter a name or part of a name in the textbox next to that and then click OK button to open the Build Team for Project1 form (Project1 is the current active project), which shows all the resource names containing the search string entered on the Filter Enterprise Resources form.

    I have a userform with a textbox (For the user to enter the search string) and a Replace button (the user should click to go to the Build Team for Project1 form).

    I can open the Filter Enterprise Resources form using VBA (Appllication.EnterpriseTeamBuilder) but i can't programmatically provide the information (ticking the checkbox, setting the search criterion in the combobox, entering the search string in the textbox and clicking the OK button) in order to get to the Build Team for Project1 form to view the list of resources.

    I would greatly appreciate it if you kindly help me with the coding of this functionality.

    Thanks SRNms


    Tuesday, September 17, 2013 12:46 PM

All replies

  • SRNms,

    I don't use Project Server but this seems like it might be a good place to try recording a macro of you going through the process manually. Then look at the resulting code and incorporate the needed statements into your existing code.

    Just a thought.

    John

    Tuesday, September 17, 2013 3:14 PM
  • Thanks John,

    I tried that already and the resulting code is EnterpriseTeamBuilder and nothing else unfortunately.

    Regards,

    SRNms

    Tuesday, September 17, 2013 9:18 PM
  • SRNms,

    Okay, it was just a thought. Hopefully someone else will jump in and confirm whether it is possible to capture the selected information to put into your userform combobox.

    Sorry I couldn't be of more help.

    John

    Tuesday, September 17, 2013 9:37 PM
  • If nothing is recorded, then that is a good indication that VBA can't do what you want. Searching the Object Browser also shows no support for what you want. In this case I think there are far too many decisions to be made about which resource should be imported for a VBA macro to adequately cover.

    The usual process is for the PM to select the team using build team from Enterprise, basing resource selection on skill set and resource manager directives.

    You can then use VBA to replace local resources with Enterprise Resources already added to the project.


    Rod Gill

    The one and only Project VBA Book

    Rod Gill Project Management

    • Proposed as answer by John - Project Tuesday, September 17, 2013 10:19 PM
    Tuesday, September 17, 2013 9:50 PM
    Moderator
  • Thanks a lot for your helpful comment Rod.

    Regards,

    SRNms

    Tuesday, September 17, 2013 10:09 PM
  • Hi John

    i was wondering if you know how to replace a local resource by an enterprise one using VBA?

    basically i was using automatic replacement at the moment of first SaveAs to the server , but this does not work properly since SP2 was installed on ProjectServer 2010.

    I would really appreciate your help to proceed on that.

    Thanx a lot

    With kind regards

    Maxim

    Wednesday, March 19, 2014 1:22 PM
  • Hi John

    i was wondering if you know how to replace a local resource by an enterprise one using VBA?

    basically i was using automatic replacement at the moment of first SaveAs to the server , but this does not work properly since SP2 was installed on ProjectServer 2010.

    I would really appreciate your help to proceed on that.

    Thanx a lot

    With kind regards

    Maxim

    Hi Maxim,

    Did you manage to substitute local resources by enterprise through VBA? If yes then how could you do that?

    Evgenii

    Friday, August 11, 2017 8:26 AM