Task ID's and adjusting Gantt Bars

S

Shanks

Hi All,

I'm using the Project_Change or ProjectBeforeTaskChange events to flag when
a Task has been modified.

All I do is set the value of the custom field "Text1" = "Y" when a change
occurs using the following code....

Private Sub Project_Change(ByVal pj As Project)
mbContinue = Application.SetTaskField("Text1", "Y", False, True,
Application.ActiveCell.Task.ID)
End Sub

This works fine when modifying the Task Name for example.

However, if Task 5 is the current active task and I adjust the start or
finish date for
Task 10 by clicking-and-dragging the gantt bar on the right-hand-side of the
screen, Task 5 is marked as the task that is changed and not Task 10.

Is there a way that I can determine the correct Task ID when adjusting start
or finish dates by dragging the gantt bar.

Hope you can help,
Thanks,
Shanks.
 
R

Rod Gill

Hi,

You need the ProjectBeforeTaskChange event, that provides a Task object of
the task that changes. However not every change triggers that event, so test
it well, but you may be lucky

Your code can't work because you are referring to the ActiveCell which is
always the selected task..
 

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