VBA code to automatically (or automagically) populate a project teamfrom the same resources each tim

A

andy.novak

In Project Professional 2007 (w/Project Server on the back end), Its
pretty darn tough on our development team leaders (as PMs) to have to
build the project team over and over and over again for each newly
created project, picking the same people (their programmers) each and
every time (we track projects as small as 2 weeks).

Is there a VBA statement I can use to populate the project team with
specific enterprise pool resources each time the button is clicked?

I'm not encouraging the use of TEMPLATES because we will be using
Portfolio Server to front end load projects. Once the project is
created in Project Server by Portfolio Server, you can't take
advantage of the template (or at least I don't think so).

Please, any and all suggestions will be welcome.

Thanks,
Andy Novak
UNT
 
R

Rod Gill

Yes. Use the EnterpriseResourceGet method. If necessary I can help you do
this, but now you know about this method it should be straightforward. You
just need a list of Resources to add and retrieve their GUIDs from the
Reporting db.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
A

andy.novak

Yes. Use the EnterpriseResourceGet method. If necessary I can help you do
this, but now you know about this method it should be straightforward. You
just need a list of Resources to add and retrieve their GUIDs from the
Reporting db.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:http://www.projectvbabook.com

Rod, thanks. I was able to use EnterpriseResourceGet (3) for example
to add Resource #3 to the project team.

Now for a followup. Is there a way to :

1. Bring in all resources (I'm guessing perhaps not supplying the
Enterprise Resource Number may do the trick)
2. Bring in all resources for a particular RBS level? It would be
great not to have to continue to mod the VBA script each time a new
employee is brought on board for a particular development team (right
now I'm thinking about having a script for each development team or
perhaps have one script where they pick their team from a msgbox)

Thanks,
Andy
 
R

Rod Gill

Yes. I would have a query in the Reporting db that selects the resources you
want then add all of them to the project. Use oledb to read the View. You
could enter a team name into a Project Custom Field and limit the list of
Resources based on that team name.

In the reporting db look at the Views ending with _userview as they include
all custom fields automatically.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



Yes. Use the EnterpriseResourceGet method. If necessary I can help you do
this, but now you know about this method it should be straightforward. You
just need a list of Resources to add and retrieve their GUIDs from the
Reporting db.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:http://www.projectvbabook.com

Rod, thanks. I was able to use EnterpriseResourceGet (3) for example
to add Resource #3 to the project team.

Now for a followup. Is there a way to :

1. Bring in all resources (I'm guessing perhaps not supplying the
Enterprise Resource Number may do the trick)
2. Bring in all resources for a particular RBS level? It would be
great not to have to continue to mod the VBA script each time a new
employee is brought on board for a particular development team (right
now I'm thinking about having a script for each development team or
perhaps have one script where they pick their team from a msgbox)

Thanks,
Andy
 
A

andy.novak

Yes. I would have a query in the Reporting db that selects the resources you
want then add all of them to the project. Use oledb to read the View. You
could enter a team name into a Project Custom Field and limit the list of
Resources based on that team name.

In the reporting db look at the Views ending with _userview as they include
all custom fields automatically.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:http://www.projectvbabook.com






Rod, thanks.  I was able to use EnterpriseResourceGet (3) for example
to add Resource #3 to the project team.

Now for a followup.  Is there a way to :

1.  Bring in all resources (I'm guessing perhaps not supplying the
Enterprise Resource Number may do the trick)
2.  Bring in all resources for a particular RBS level?  It would be
great not to have to continue to mod the VBA script each time a new
employee is brought on board for a particular development team (right
now I'm thinking about having a script for each development team or
perhaps have one script where they pick their team from a msgbox)

Thanks,
Andy

So, just use a variable in the EnterpriseResourceGet function?

Could I just as easily use the RBS rather than creating a special
custom field for this?

I may need a little more detail in that I am fairly new at this VBA
thing.

Thanks,
Andy
 
R

Rod Gill

Hi,

No create a View in the reporting db to return all Resource GUIDs for all
required team members, then use the EnterpriseResourceGet function for each
one to add them to the project.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



Yes. I would have a query in the Reporting db that selects the resources
you
want then add all of them to the project. Use oledb to read the View. You
could enter a team name into a Project Custom Field and limit the list of
Resources based on that team name.

In the reporting db look at the Views ending with _userview as they
include
all custom fields automatically.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:http://www.projectvbabook.com






Rod, thanks. I was able to use EnterpriseResourceGet (3) for example
to add Resource #3 to the project team.

Now for a followup. Is there a way to :

1. Bring in all resources (I'm guessing perhaps not supplying the
Enterprise Resource Number may do the trick)
2. Bring in all resources for a particular RBS level? It would be
great not to have to continue to mod the VBA script each time a new
employee is brought on board for a particular development team (right
now I'm thinking about having a script for each development team or
perhaps have one script where they pick their team from a msgbox)

Thanks,
Andy

So, just use a variable in the EnterpriseResourceGet function?

Could I just as easily use the RBS rather than creating a special
custom field for this?

I may need a little more detail in that I am fairly new at this VBA
thing.

Thanks,
Andy
 
A

andy.novak

Hi,

No create a View in the reporting db to return all Resource GUIDs for all
required team members, then use the EnterpriseResourceGet function for each
one to add them to the project.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:http://www.projectvbabook.com












So, just use a variable in the EnterpriseResourceGet function?

Could I just as easily use the RBS rather than creating a special
custom field for this?

I may need a little more detail in that I am fairly new at this VBA
thing.

Thanks,
Andy

Oh, OK. But would I still use a variable with the
EnterpriseResourceGet function to "loop" through the resources?
 
R

Rod Gill

If it holds the GUID, yes and certainly you would have a loop that goes thru
each record from the db with Resource GUIDs..

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com



Hi,

No create a View in the reporting db to return all Resource GUIDs for all
required team members, then use the EnterpriseResourceGet function for
each
one to add them to the project.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:http://www.projectvbabook.com












So, just use a variable in the EnterpriseResourceGet function?

Could I just as easily use the RBS rather than creating a special
custom field for this?

I may need a little more detail in that I am fairly new at this VBA
thing.

Thanks,
Andy

Oh, OK. But would I still use a variable with the
EnterpriseResourceGet function to "loop" through the resources?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top