ProjectResourceNew Event

S

Sebastian Cordoba

Hi guys.

I need some advice about how to handle the 'ProjectResourceNew' event in
order to assign the Standard Rate ($1/hr) for every resource that PM's add
manually.

I can't figure out how to identify the LAST resource created (get his ID),
so I don't have to review all of the project resources. This is what I have
right now:

Private Sub App_ProjectResourceNew(ByVal pj As Project, ByVal ID As Long)
Dim rec As Resource

For Each rec In ActiveProject.Resources
If Not (rec Is Nothing) Then
rec.StandardRate = 1
End If
Next rec
End Sub

I thought I could use the pjResourceStandardRate field, but I don't know how.


Thanks in advance.
 
R

Rod Gill

One way is to set the default standard rate value to $1 either manually for
each user under Tools, Options, General tab or via code.

--

Rod Gill
Microsoft MVP for Project

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

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