Linking Tasks

R

rama

Hi,

I want to trap event fired when linking tasks in Proj. Prof 2007. If certain
business policies meet I can let the user link tasks, otherwise I would like
to alert him. I don't want to wait till ProjectSave.
 
J

Jim Aksel

I am not aware of an event that will trigger only when links are created.
Here is an outline of a subroutine that will fire every time the project
changes.

Private Sub Project_Change(ByVal pj As Project)
If (links have changed) then
If(Business Rules Allow Link) then
Let Link Stand
Else
Erase the link
MsgBox("Business Rules will not allow linking at this time")
End If
End If
End Sub

The challenge -- How will Project know the predecessor or successor changed?

Consider: Write a macro for the user to run. The macro can determine if
links are allowed on certain tasks. If the link violates a business rule,
set a Flag field to "Yes" then filter on the flag.

The user may run the macro at any time, not wait until save.

Hope that helps. If you need additional guidance, try posting to
microsoft.public.project.developer
--
If this post was helpful, please consider rating it.

Jim Aksel, MVP

Check out my blog for more information:
http://www.msprojectblog.com
 
S

Steve House [MVP]

To link or not to link tasks should not be subject to policy decisions IMHO.
Links are driven by physical necessity - you can't paint a wall until after
you've built the wall sort of logic. If the link makes physical sense it
should be there, if it doesn't describe a physical dependency it should not.
That's always driven by the physical nature of the actual work and are not a
matter of choice or management policy. If the user can add tasks to the
plan at all they should be able to do it correctly and add links where the
nature of the work describes it. I can't imagine allowing them to enter
tasks and not allow them to link them as needed.
 

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