M
MrHarakiri
I´ve got a strange problem. I tried to add a assignemnt using a sub, but i
got a error 1101. So i did it from MS Project (activity information?) and
it worked fine. Then i deleted the assignemnt and tried to do it from the Sub
and then it worked! What could be the problem? Any ideas?
Sub test()
Dim tsk As Task
Dim res As Resource
Dim ass As Assignment
Set tsk = ActiveProject.Tasks(4)
Set res = ActiveProject.Resources(201)
Set ass = tsk.Assignments.Add(tsk.ID, res.ID, "1")
ass.Delete
End Sub
got a error 1101. So i did it from MS Project (activity information?) and
it worked fine. Then i deleted the assignemnt and tried to do it from the Sub
and then it worked! What could be the problem? Any ideas?
Sub test()
Dim tsk As Task
Dim res As Resource
Dim ass As Assignment
Set tsk = ActiveProject.Tasks(4)
Set res = ActiveProject.Resources(201)
Set ass = tsk.Assignments.Add(tsk.ID, res.ID, "1")
ass.Delete
End Sub