How to change the Start1 value with respective Task

  • Thread starter Raveendra Madupu
  • Start date
R

Raveendra Madupu

Hi All!
I am doing some VBA programming with MS Project 2002. I
have 6 columns in my project.
Task Name, Duration, Start, Finish, Predecessor, Start1.
Start1 values is always Finish + 1 day.
When I change the Predecessor values, corresponding Task's
Start1 values should change respectively.
I written my code in the Project_Change event.
'My code
Private Sub Project_Change(ByVal pj As Project)
Test1 pj
End Sub

'Module code
Public Sub Test1(ByVal pj As Project)
Dim tsk_Cnt, i
Dim t As Task
tsk_Cnt = pj.Tasks.Count
For i = 1 To tsk_Cnt
Set t = pj.Tasks.Item(i)
t.Start1 = t.Finish + 1
Next
End Sub

With this code my basic requirement is filling, but the
Change event is firing continuously. It is going to
infinite loop.

How to break this infinete loop.
Ok, how to change the Start1 value to Finish + 1, with
respective Task.
Thanks in advance for your time and help.
Regards
...Raveendra
 

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