Automating PRedecessors in Project 2003

Doug Keely

New Member
Joined
Apr 15, 2010
Messages
2
Can anyone help me with what I'm trying to do here. I want to have Project 2003 update some specific Predecessor metrics based on start dates in this and a previous task line. The code, i think explains it better than I'm doing. This code all works, except i cant figure out how to record a task reference and then recall that task in order to update its predecessor.

Sub calculateNewPreds()

Dim ts As Tasks
Dim t As Task

Set ts = ActiveProject.Tasks

For Each t In ts

If Not t Is Nothing Then

If t.Name = "Project Start" Then

ProjStartDate = t.Start

End If

If t.Name = "New Sub Project Start Date" Then

IDEDPCStart = t.Start
'myUIDPred = code here to get reference task information

PDiff = (Application.DateDifference(ProjStartDate, IDEDPCStart, ActiveProject.Calendar)) / 60 / 8

If PDiff > 0 Then

myPreddy = "1FS + " & CStr(PDiff)
' code here to apply to referenced task

End If

End If

End If

Next t

End Sub
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,225,551
Messages
6,185,600
Members
453,307
Latest member
addydata

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top