ProjectResourceNew Event

C

Chris

I have the code below in a template file to force new resource base calendars
to a Federal Calendar (instead of the default Standard calendar). This code
works fine when adding single resources anywhere, however the event itself
appears to be by-passed when you add a group distribution list from the
address book and request project to expand the group distribution list to
individual resources. How can I force project to trigger this event in this
case? Is there a work-around?

Private Sub ProjApp_ProjectResourceNew(ByVal pj As Project, ByVal ID As Long)
If pj.Resources.UniqueID(ID).BaseCalendar <> "Federal Calendar" Then
pj.Resources.UniqueID(ID).BaseCalendar = "Federal Calendar"
End If
End Sub
 
C

Chris

It looks like the event will fire if you have 4 or less resources in the
distribution list. If you have 5 or more resources, the event is by-passed.
Is there a reason for this distinction?
 
J

Jack Dahlgren

Project events are not all that reliable in cases like this. There are a
number of known exceptions where they don't work, but there are others like
this where the problem has been discovered. Sorry if that is not much help...

But if the "Federal Calendar" is the default, why not modify "Standard" to
match to be the equivalent? You could then avoid this whole issue.

-Jack Dahlgren
 

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