Hi,
i am copying Dates from one project to another for Tasks that appear both projects.
I use the Unique ID to allocate the relevent Tasks.
that Dates that are being copied aren't the dates that i see in the project and i dont understand where is the problem coming from.
hope for your advise,
thanks,
vered
Dim t As Task
Dim ts As Tasks
EV1Proj = "C:\Users\vered.cohen\Desktop\Temp\13.07.14_Project Flow Until eSoC.mpp"
Set eSoCProj = GetObject("C:\Users\vered.cohen\Desktop\Temp\13.07.14_Project Flow until EV1 Done.mpp")
Set EV1Proj = ActiveProject
Set ts = ActiveProject.Tasks
For Each t In ts
Set EV1Proj = ActiveProject
Debug.Print t.ID
If t.Text2 = "Yes" Then
Debug.Print t.Text2
t.ConstraintType = pjMSO
Debug.Print eSoCProj.Tasks.UniqueID(t.Text10).Finish1
t.ConstraintDate = Int(eSoCProj.Tasks.UniqueID(t.Text10).Finish1)
MsgBox (t.Name & " - " & Int(t.ConstraintDate))
t.Duration = 480
Debug.Print t.Name
Set EV1Proj = ActiveProject
End If
Next t
MsgBox ("DONE :)")
End Sub